Crates.io | practicaltimestamp |
lib.rs | practicaltimestamp |
version | 0.1.0 |
source | src |
created_at | 2020-10-09 02:00:28.909136 |
updated_at | 2020-10-09 02:00:28.909136 |
description | For efficiently handling unix timestamps |
homepage | |
repository | https://github.com/dlee13/practicaltimestamp |
max_upload_size | |
id | 297501 |
size | 14,995 |
This is yet another date and time library, but the aim is to specifically support a more limited range of dates to simplify implementation and to allow for some optimizations to date conversions.
PracticalTimestamp correctly handles dates and times between 1/1/1970 at 12:00:00AM UTC and 1/1/10000 at 12:00:00AM UTC.
Subseconds are not used and timezones are not considered, but support for these could be added by wrapping UnixTimestamp
in another struct implementation that tracks them.
The only feature is std
library support. It is enabled by default, and it allows for converting between UnixTimestamp
and std::time::SystemTime
types. The api is mostly compatible with #![no_std]
as the only thing requiring the std
library is Timestamp::now()
. The std
feature can be disabled by specifying default-features = false
in your dependencies.
This project is licensed under the MIT license.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as MIT, without any additional terms or conditions.