Crate spinoso_timesource ·
Time is an abstraction of dates and times.
This module implements the
Time class from Ruby Core.
In Artichoke, Time is represented as a 64-bit signed integer of seconds since January 1, 1970 UTC (the Unix Epoch) and an unsigned 32-bit integer of subsecond nanoseconds. This allows representing roughly 584 billion years.
You can use this class in your application by accessing it directly. As a Core class, it is globally available:
This implementation of
Time is dependent on the selected feature. The
tzrs feature uses the
tzdb crate for getting the local timezone
information, and combines with the
tz-rs crate to generate the time.
This crate can support several backends, which are designed to be independent of each other. The availability of different backends is controlled by Cargo features, all of which are enabled by default:
tzrs-local: Enable the detection of the system timezone with the tzrs backend. This feature is enabled by default. Enabling this feature also activates the tzrs feature.
If the tzrs-local feature is disabled, the local timezone is defaulted to GMT (not UTC).
This crate requires
std, the Rust Standard Library.
pub use strftime;
- A Time struct backed by the
- Number of microseconds in one nanosecond.
- Number of nanoseconds in one second.