Skip to main content

parse_server_time

Function parse_server_time 

Source
pub fn parse_server_time(value: &str) -> Option<u64>
Expand description

Read a server-time value as milliseconds since the Unix epoch.

Returns None for anything that is not a well-formed UTC instant, and for any instant before 1970, which no server-time legitimately carries. The caller should then stamp the message with its own clock: a message with a nonsense timestamp sorts into the wrong place forever, which is worse than one stamped a few milliseconds late.