#wall-clock #date-time #timezone #representation #serialization #read #serde #displayed #diesel-pg

wall-clock

A representation of time as displayed on a wall clock, without date or time zone

4 releases

0.2.2 Apr 3, 2024
0.2.1 Apr 2, 2024
0.2.0 Apr 2, 2024
0.1.0 Apr 2, 2024

#9 in #wall-clock

Download history 168/week @ 2025-03-03 79/week @ 2025-03-10 173/week @ 2025-03-17 98/week @ 2025-03-24 83/week @ 2025-03-31 104/week @ 2025-04-07 39/week @ 2025-04-14 28/week @ 2025-04-21 84/week @ 2025-04-28 14/week @ 2025-05-05 67/week @ 2025-05-12 39/week @ 2025-05-19 19/week @ 2025-05-26 2/week @ 2025-06-02 1/week @ 2025-06-09 63/week @ 2025-06-16

85 downloads per month

MIT license

13KB
211 lines

Wall Clock Time

ci codecov release docs

wall-clock provides a simple and very basic struct for repsenting time as one reads it off a clock on the wall, e.g. with no concept of date, or time zone.

Examples

Making a wall clock time:

use wall_clock::WallClockTime;
let wct = WallClockTime::new(15, 0, 0);

You can also use the time! macro to get a syntax resembling a literal:

use wall_clock::time;
let wct = time!(15:00:00);

Features

wall-clock ships with the following features:

  • diesel-pg: Enables interop with PostgreSQL TIME columns using Diesel.
  • serde: Enables serialization and desearialization with serde. (Enabled by default.)

Dependencies

~0.1–1MB
~19K SLoC