Skip to main content
formatdate(format, time) formats time using the given format string. time must be an RFC 3339 timestamp string.

Signature

Format tokens

Example

Stamp a release artifact with a timestamp passed in from the environment or CI system:
Pass the timestamp at run time:
The archive name becomes app-1.4.2-2024-03-15.tar.gz.

Notes

  • time must be a valid RFC 3339 string (e.g. 2024-03-15T10:30:00Z). An invalid format produces an error at evaluation time.
  • formatdate does not perform timezone conversion. The output timezone depends on the input timestamp.