Crate epochs

Source
Expand description

Convert various epoch times to chrono::NaiveDateTime times.

Functionsยง

apfs
APFS time is the number of nanoseconds since the Unix epoch (cf., APFS filesystem format).
chrome
Chrome time is the number of microseconds since 1601-01-01, which is 11,644,473,600 seconds before the Unix epoch.
cocoa
Cocoa time is the number of seconds since 2001-01-01, which is 978,307,200 seconds after the Unix epoch.
google_calendar
Google Calendar time seems to count 32-day months from the day before the Unix epoch (@noppers worked out how to do this).
icq
ICQ time is the number of days since 1899-12-30. Days can have a fractional part.
java
Java time is the number of milliseconds since the Unix epoch.
mozilla
Mozilla time (e.g., Firefox) is the number of microseconds since the Unix epoch.
symbian
Symbian time is the number of microseconds since the year 0, which is 62,167,219,200 seconds before the Unix epoch.
to_apfs
Convert the given NaiveDateTime to an APFS time.
to_chrome
Convert the given NaiveDateTime to a Chrome time.
to_cocoa
Convert the given NaiveDateTime to a Cocoa time.
to_google_calendar
Convert the given NaiveDateTime to a Google Calendar time.
to_icq
Convert the given NaiveDateTime to an ICQ time.
to_java
Convert the given NaiveDateTime to a Java time.
to_mozilla
Convert the given NaiveDateTime to a Mozilla time.
to_symbian
Convert the given NaiveDateTime to a Symbian time.
to_unix
Convert the given NaiveDateTime to a Unix time.
to_uuid_v1
Convert the given NaiveDateTime to a UUIDv1 time.
to_windows_date
Convert the given NaiveDateTime to a Windows Date time.
to_windows_file
Convert the given NaiveDateTime to a Windows File time.
unix
Unix time is the number of seconds since 1970-01-01.
uuid_v1
UUID version 1 time (RFC 4122) is the number of hectonanoseconds (100 ns) since 1582-10-15, which is 12,219,292,800 seconds before the Unix epoch.
windows_date
Windows date time (e.g., .NET) is the number of hectonanoseconds (100 ns) since 0001-01-01, which is 62,135,596,800 seconds before the Unix epoch.
windows_file
Windows file time (e.g., NTFS) is the number of hectonanoseconds (100 ns) since 1601-01-01, which is 11,644,473,600 seconds before the Unix epoch.