strftime_ms_utc

Function strftime_ms_utc 

Source
pub fn strftime_ms_utc(
    format: impl AsRef<str>,
    ts_ms: TimeStampMs,
) -> Result<String, Error>
Expand description

Return the current time in the specified format, in the UTC time zone, with support for custom millisecond formatting.

The standard format directives from strftime are supported. Additionally, the special text sequence ‘{ms}’ will be replaced with the millisecond component.

Example: strftime_ms_utc(“%Y-%m-%d %H:%M:%S.{ms}”, ts_ms)

This function will validate the format string before attempting to format the time.