hpcflow.sdk.monitoring.columns.format_datetime#

hpcflow.sdk.monitoring.columns.format_datetime(value, *, same_date_as=None, display_timezone=None, include_timezone=None, current_local_time=None, align_omitted_date=False)#

Format a stored timestamp in the chosen display timezone, to seconds.

Missing values produce an em dash and invalid values are returned unchanged. Naive legacy values are interpreted as UTC. Compare dates after timezone conversion; same_date_as omits a matching date and align_omitted_date reserves its eleven-character width so clock times still align.

By default, omit the timezone suffix only when both its abbreviation and UTC offset match current_local_time (or the machine’s current local time). include_timezone explicitly overrides this rule. Each timestamp is converted independently, preserving historical daylight-saving offsets. Stored values are never modified.

Parameters:
  • value (str)

  • same_date_as (str | None)

  • display_timezone (tzinfo | None)

  • include_timezone (bool | None)

  • current_local_time (datetime | None)

  • align_omitted_date (bool)

Return type:

str