Skip to main content

Module dates

Module dates 

Source
Expand description

Parsing of user-supplied dates.

Accepted forms:

  • YYYY-MM-DD HH:MM:SS — interpreted as UTC (offset +0000)
  • YYYY-MM-DD HH:MM:SS +HH:MM / +HHMM / Z — explicit offset
  • RFC 3339, e.g. 2024-01-01T10:00:00+05:30

Constants§

DATE_FORMAT_HELP

Functions§

format_git_time
Render a git timestamp as YYYY-MM-DD HH:MM:SS +HHMM in its own offset.
parse_git_time
Parse a date into a git timestamp (seconds + offset).
parse_utc
The instant as naive UTC, for display and range arithmetic.
to_rfc3339
RFC 3339 rendering in the timestamp’s own offset, e.g. 2024-01-01T10:00:00+05:30.