Overview

How date/time formatting is driven by session settings across the frontend

👤 Rahul Bhangale📅 Updated: Mar 13, 2026🏷️ util

Date Time

The frontend must never hard-code date or time formats. All displayed values are driven by two session-backed settings:

  • Date format locale — stored in lab settings as date_format_locale: "IN" or "US", controls the ordering of day/month/year.
  • 12h / 24h preference — stored in user preferences as preferences.is_24_hrs_format: "0" (12h) or "1" (24h), controls whether time is shown in 12-hour or 24-hour notation.

These values are surfaced to the frontend via Redux state and consumed by the shared helpers dt() and dtf().

Source of truth (session keys)

SettingSession keyPossible values
Date format localedate_format_locale"IN", "US"
12h / 24h preferencepreferences.is_24_hrs_format"0" (12h), "1" (24h)

Both values are read from the Redux store at format-time; no component needs to pass them explicitly.

On this page