16 releases

0.1.15 Jan 14, 2025
0.1.14 Aug 18, 2024
0.1.13 Jul 1, 2024
0.1.12 Apr 20, 2024
0.1.9 Mar 9, 2024

#479 in Encoding

Download history 35/week @ 2025-01-29 86/week @ 2025-02-05 134/week @ 2025-02-12 111/week @ 2025-02-19 174/week @ 2025-02-26 142/week @ 2025-03-05 96/week @ 2025-03-12 190/week @ 2025-03-19 112/week @ 2025-03-26 141/week @ 2025-04-02 156/week @ 2025-04-09 148/week @ 2025-04-16 228/week @ 2025-04-23 105/week @ 2025-04-30 134/week @ 2025-05-07 211/week @ 2025-05-14

712 downloads per month
Used in 23 crates (9 directly)

MIT license

29KB
743 lines

Timestamp/monotonic objects

Features

  • serde Serialization/deserialization with serde

  • chrono conversion between chrono types, also required to parse/deserialize strings from human-readable times

  • sqlx encoding/decoding for sqlx

  • as-float-secs a legacy feature: the default Timestamp de/serialization and string parsing is to/from float seconds (including integers)

sqlx encoding/decoding

Timestamp

  • Sqlite: INTEGER (nanoseconds)

  • PostgreSQL: TIMESTAMPTZ/TIMESTAMP

Monotonic

  • Sqlite: INTEGER (nanoseconds)

  • PostgreSQL: BIGINT (nanoseconds)

Dependencies

~2–17MB
~254K SLoC