absl::FormatTime

FormatTime overloads

Synopses

Declared in <absl/time/time.h>

Formats the given time using the RFC3339_full format in the local time zone.

std::string
FormatTime(Time t);
» more...

Formats the given time using the RFC3339_full format in the given time zone.

std::string
FormatTime(
    Time t,
    TimeZone tz);
» more...

Formats the given absl::Time in the absl::TimeZone according to the provided format string. Uses strftime()-like formatting options, with the following extensions:

std::string
FormatTime(
    std::string_view format,
    Time t,
    TimeZone tz);
» more...

Return Value

The formatted time string.

Parameters

NameDescription
tThe time to format.
tzThe time zone to format in.
formatThe strftime()-like format string.