Skip to content

Commit d3bf411

Browse files
mjabascal10Kbayero
andauthored
feat(date-timezone): dynamically generate timezone list using moment-… (#1425)
* feat(date-timezone): dynamically generate timezone list using moment-timezone Signed-off-by: Manuel Abascal <[email protected]> * Update v10-deployment-pipeline.yml * chore(release): update changelog and version to 10.9.3 Signed-off-by: Manuel Abascal <[email protected]> * feat(date-timezone): dynamically generate timezone list using moment-timezone Signed-off-by: Manuel Abascal <[email protected]> * chore(release): update changelog and version to 10.9.3 Signed-off-by: Manuel Abascal <[email protected]> --------- Signed-off-by: Manuel Abascal <[email protected]> Co-authored-by: Yorjander Hernandez Vergara <[email protected]>
1 parent a344c3d commit d3bf411

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# UTMStack 10.9.2 Release Notes
1+
# UTMStack 10.9.3 Release Notes
22

3-
- Added new Pacific time zones (New Zealand and Fiji) to the Date Settings section.
4-
- Added TLS connection options and setup steps for secure Syslog integration
5-
- Improved sorting of asset sources in tables, ensuring consistent and predictable order for names, IPs, and combined entries.
6-
– Improved correlation rule handling for pfSense and SonicWall data sources to enhance detection accuracy and event normalization.
3+
- Enriched the TIMEZONES constant to include additional IANA zones for broader coverage.
4+
- Support for additional syslog framing methods (RFC 5424 octet counting).

frontend/src/app/shared/constants/date-timezone-date.const.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import moment from 'moment-timezone';
2+
13
export const DATE_SECTION_ID = 5;
24

35
export const DEFAULT_DATE_SETTING_TIMEZONE = 'UTC';
@@ -6,7 +8,19 @@ export const DEFAULT_DATE_SETTING_DATE = 'medium';
68
export const DATE_SETTING_TIMEZONE_SHORT = 'utmstack.time.zone';
79
export const DATE_SETTING_FORMAT_SHORT = 'utmstack.time.dateformat';
810

9-
export const TIMEZONES: Array<{ label: string; timezone: string, zone: string }> = [
11+
export const TIMEZONES: Array<{ label: string; timezone: string; zone: string }> =
12+
moment.tz.names().map((tz) => {
13+
const parts = tz.split('/');
14+
const zone = parts[0] || 'Other';
15+
const label = tz.replace(/_/g, ' ');
16+
return {
17+
label,
18+
timezone: tz,
19+
zone
20+
};
21+
});
22+
23+
/*export const TIMEZONES: Array<{ label: string; timezone: string, zone: string }> = [
1024
{label: 'UTC', timezone: 'UTC', zone: 'UTC'},
1125
{label: 'Eastern Standard Time (New York)', timezone: 'America/New_York', zone: 'America'},
1226
{label: 'Pacific Standard Time (Los Angeles)', timezone: 'America/Los_Angeles', zone: 'America'},
@@ -38,7 +52,7 @@ export const TIMEZONES: Array<{ label: string; timezone: string, zone: string }>
3852
{label: 'Jerusalem (IST)', timezone: 'Asia/Jerusalem', zone: 'Asia'},
3953
{label: 'Buenos Aires (ART)', timezone: 'America/Argentina/Buenos_Aires', zone: 'America'},
4054
{label: 'São Paulo (BRT)', timezone: 'America/Sao_Paulo', zone: 'America'},
41-
];
55+
];*/
4256

4357
export const DATE_FORMATS: Array<{ label: string; format: string; equivalentTo: string }> = [
4458
{label: 'Short', format: 'short', equivalentTo: 'M/d/yy, h:mm a'},

version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version: 10.9.2
1+
version: 10.9.3

0 commit comments

Comments
 (0)