get_local_timestamp_rfc3339

Function get_local_timestamp_rfc3339 

Source
pub fn get_local_timestamp_rfc3339() -> Result<(String, Errors)>
Expand description

Gets a timestamp string using in either the local offset or +00:00

ยงReturns

Returns a Result of either the timestamp in the following format or the error encountered during its construction.

[year]-[month]-[day]T[hour]:[minute]:[second][offset_hour sign:mandatory]:[offset_second]

, or an error if the method fails. The timezone will be in the local offset IF any of the following succeed: 1.) set_global_offset is called. 2.) time::UtcOffset::current_local_offset() works 3.) The library is able to query the timezone using system commands. If none succeed, we default to UTC.