STRING:TIMESTAMP¶
This generator expression belongs to the String Generations family. See that section for related generator expressions.
Syntax¶
$<STRING:TIMESTAMP[,(UTC|format)]...>
Added in version 4.3.
Produce a string representation of the current date and/or time.
If the generator expression is unable to obtain a timestamp, the result will be
the empty string "".
The optional UTC flag requests the current date/time representation to be in
Coordinated Universal Time (UTC) rather than local time.
If the SOURCE_DATE_EPOCH environment variable is set, its value will be used
instead of the current time. See
https://reproducible-builds.org/specs/source-date-epoch/ for details.
The optional <format> may contain the following format specifiers:
%%A literal percent sign (%).
%dThe day of the current month (01-31).
%HThe hour on a 24-hour clock (00-23).
%IThe hour on a 12-hour clock (01-12).
%jThe day of the current year (001-366).
%mThe month of the current year (01-12).
%bAbbreviated month name (e.g. Oct).
%BFull month name (e.g. October).
%MThe minute of the current hour (00-59).
%sSeconds since midnight (UTC) 1-Jan-1970 (UNIX time).
%SThe second of the current minute. 60 represents a leap second. (00-60)
%fThe microsecond of the current second (000000-999999).
%UThe week number of the current year (00-53).
%VThe ISO 8601 week number of the current year (01-53).
%wThe day of the current week. 0 is Sunday. (0-6)
%aAbbreviated weekday name (e.g. Fri).
%AFull weekday name (e.g. Friday).
%yThe last two digits of the current year (00-99).
%YThe current year.
%zThe offset of the time zone from UTC, in hours and minutes, with format
+hhmmor-hhmm.%ZThe time zone name.
Unknown format specifiers will be ignored and copied to the output as-is.
If no explicit format is given, it will default to:
%Y-%m-%dT%H:%M:%Sfor local time.%Y-%m-%dT%H:%M:%SZfor UTC.