diff --git a/apps/zui/docs/features/Packet-Captures.md b/apps/zui/docs/features/Packet-Captures.md index 541444287..c5fc1fdbe 100644 --- a/apps/zui/docs/features/Packet-Captures.md +++ b/apps/zui/docs/features/Packet-Captures.md @@ -1,7 +1,3 @@ ---- -sidebar_position: 2 ---- - # Packet Captures The video below describes Zui's features for working with packet capture diff --git a/apps/zui/docs/features/Preview-Load.md b/apps/zui/docs/features/Preview-Load.md index ac6fc35db..6452bd297 100644 --- a/apps/zui/docs/features/Preview-Load.md +++ b/apps/zui/docs/features/Preview-Load.md @@ -1,7 +1,3 @@ ---- -sidebar_position: 1 ---- - # Preview & Load The video below shows how you can preview and diff --git a/apps/zui/docs/features/README.md b/apps/zui/docs/features/README.md index 070b1b546..0ca4dc581 100644 --- a/apps/zui/docs/features/README.md +++ b/apps/zui/docs/features/README.md @@ -1,9 +1,7 @@ ---- -sidebar_position: 4 ---- - # Features Learn how to get the most from Zui features. Topics described here include: +* [Packet Captures](Packet-Captures.md) * [Preview and load data](Preview-Load.md) +* [Time Display](Time-Display.md) diff --git a/apps/zui/docs/features/Time-Display.md b/apps/zui/docs/features/Time-Display.md new file mode 100644 index 000000000..87508c032 --- /dev/null +++ b/apps/zui/docs/features/Time-Display.md @@ -0,0 +1,35 @@ +# Time Display + +By default, Zui displays Zed `time` values in the Table, Inspector, +and Detail views using [ZSON format](https://zed.brimdata.io/docs/formats/zson#23-primitive-values). +This is an [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) +date/time string in nanosecond precision ending in `Z` to indicate +[UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time), e.g., +`2024-08-14T19:12:51.123456789Z`. + +Starting with Zui release v1.18.0, two different options in Zui **Settings** +may be used to change the presentation of time values. + + + +1. If the **Time Zone** setting is changed from its default **UTC** while the + **Time Format** setting remains at its empty default, `time` values will be + rendered instead in an RFC 3339 format with a numeric offset, e.g., + `2024-08-14T12:12:51.123-07:00` for setting `US/Pacific`. This format can be + represented using [strftime directives](https://github.com/samsonjs/strftime?tab=readme-ov-file#supported-specifiers) + as `%Y-%m-%dT%H:%M:%S.%L%:z`. Note that this format is acceptable as a + literal `time` value in a Zed program, e.g., assuming data containing a field + `ts` of the `time` type, the [search expression](https://zed.brimdata.io/docs/language/search-expressions) + `ts > 2024-08-14T12:12:51.123-07:00` is syntactically valid. + +2. If the **Time Format** setting is changed from its empty default, any + [strftime directives](https://github.com/samsonjs/strftime?tab=readme-ov-file#supported-specifiers) + in the setting are used to format time values. For instance the setting + `%m/%d/%Y` would produce the displayed value `08/14/2024`. + +:::tip Note +These settings do not currently change the times shown on the X axis of the +stacked bar chart that appears above query results. Addressing this is tracked +in issue [zui/3141](https://github.com/brimdata/zui/issues/3141). Please add a +comment to the issue if you find it affects your use of Zui. +::: diff --git a/apps/zui/docs/media/Settings-Time.png b/apps/zui/docs/media/Settings-Time.png new file mode 100644 index 000000000..e2917068d Binary files /dev/null and b/apps/zui/docs/media/Settings-Time.png differ diff --git a/apps/zui/src/electron/run-main/run-configurations.ts b/apps/zui/src/electron/run-main/run-configurations.ts index 680158b28..46d494dcb 100644 --- a/apps/zui/src/electron/run-main/run-configurations.ts +++ b/apps/zui/src/electron/run-main/run-configurations.ts @@ -37,7 +37,7 @@ export function runConfigurations() { properties: { timeZone: { name: "timeZone", - label: "Timezone", + label: "Time Zone", type: "string", defaultValue: "UTC", enum: time.getZoneNames(), @@ -50,7 +50,7 @@ export function runConfigurations() { placeholder: "%Y-%m-%dT%H:%M:%S.%L%:z", helpLink: { label: "docs", - url: "https://github.com/samsonjs/strftime?tab=readme-ov-file#supported-specifiers", + url: "https://zui.brimdata.io/docs/features/Time-Display", }, }, thousandsSeparator: {