Skip to content

Locale Config

Locale Config is a config node in the Rosepetal palette. It does not appear as a widget on the dashboard and has no input or output ports: its only job is to store, in one central place, the time zone and the date/time format used when displaying timestamps.

Other dashboard nodes that display dates reference it through their Locale field. This way the presentation criteria (time zone, date format and 12/24-hour clock) are defined once, and every widget that shares it renders timestamps consistently.

Features

  • Shared config node (config category): you create one instance and reuse it from several widgets.
  • Defines the time zone in IANA format (for example Europe/Madrid). The editor fills the dropdown with every zone the browser knows through Intl.supportedValuesOf('timeZone'), with a fallback list if the browser does not support it.
  • Defines the date format from several predefined options: DD/MM/YYYY, MM/DD/YYYY, YYYY-MM-DD, DD-MM-YYYY and DD.MM.YYYY.
  • Defines the time format: 24-hour or 12-hour (AM/PM).
  • The Browser default option (empty value) for time zone and date format defers to the local settings of whoever is viewing the dashboard.
  • The editor shows a live preview of the resulting date and time, refreshed every second while the dialog is open.
  • It only changes the presentation: timestamps are not modified internally, and messages keep their original UTC/epoch values.

Configuration

PropertyDescriptionDefault
nameDescriptive name for this locale configuration (for example Spain dd/mm). If empty, the node label is composed from the date format and the time zone.""
timezoneIANA time zone used to render timestamps (for example Europe/Madrid). Empty value = the viewer's browser time zone.""
dateFormatFormat used to render the date part. Empty value = the browser's local format."DD/MM/YYYY"
timeFormat24-hour clock (24h) or 12-hour clock with AM/PM (12h)."24h"

Note: in the server node (rosepetal-locale-config.js) the default value of timeFormat is 24h, and those of timezone and dateFormat are the empty string when not configured. The editor defaults (dateFormat: DD/MM/YYYY) come from the defaults{} block in the HTML.

Usage

This node neither processes input messages nor produces output messages. It has no ports and no runtime logic beyond exposing its properties (timezone, dateFormat, timeFormat) for other nodes to read.

To use it:

  1. Create a single instance of the Locale Config node (for example from the configuration panel, or by expanding the Locale field of a compatible widget).
  2. Select that instance in the Locale field of the dashboard nodes that display dates: image log, image queue, last error, image grid, image dialog, canvas fabric and audit manager.
  3. All those widgets will then render timestamps in the configured time zone and format.

Because it is a shared config node, a change to the instance is reflected in every node that references it, with no need to reconfigure each widget separately.