Skip to content

Time:format_utc(format)

Since: Version 20220807-113146-c2fee766

The functionality described in this section requires version 20220807-113146-c2fee766 of wezterm, or a more recent version.

Formats the time object as a string, using UTC date/time representation of the time.

The format string supports the set of formatting placeholders described here.

> wezterm.time.now():format_utc("%Y-%m-%d %H:%M:%S")
"2022-07-17 18:14:15"
> wezterm.time.now():format("%Y-%m-%d %H:%M:%S")
"2022-07-17 11:14:15"

See also Time:format().