Crate thetime

Source

Re-exports§

pub use ntp::*;
pub use system::*;
pub use timezones::*;

Modules§

epoch
ntp
re-exported for easier access (no use thetime::ntp::System;, just use thetime::System;)
system
re-exported for easier access (no use thetime::system::System;, just use thetime::System;)
timezones
Timezones - a list of common timezones Note: some names clash, examples Arabia Standard Time (AST) and Atlantic Standard Time (ATST), so we lengthen as shown above

Enums§

RelativeTime
An enum to represent whether a time is in the past, present or future

Constants§

MAGIC_MAC_OS
Magic number for Macos epoch (offset between 1904 and 1970)
MAGIC_MAC_OS_CFA
Magic number for Macos Absolute epoch (offset between 2001 and 1970)
MAGIC_SAS_4GL
Magic number for SAS 4GL (offset betwenn 1960 and 1970)
OFFSET_1601
Offset between 1601 and 1970
REF_TIME_1970
Reference time

Traits§

ImplsDuration
A trait so that we can use chrono::Duration and core::time::Duration interchangeably in the Time::add_duration function
IntTime
Provides wrappers on integer std types to parse into time structs, and also to pretty print timestamp integers
StrTime
Provides wrappers on string std types to parse into time structs
Time
Implements the core functionality of the library
TimeDiff
Implements the diff functions (optional)

Functions§

now
Returns the current time in seconds since Unix epoch