time

Ergonomic, no-std-compatible date and time handling for Rust with parsing, formatting, and macro literals.

Library
Cargo
v0.3.55
1,344 stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
89 /100 Excellent
Development Activity 92
Maintenance 96
Community 80
Maturity 60
Momentum 28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
83 /100 Excellent
Architecture 85
Code Quality 88
Innovation 80
Learning Curve 78

The time crate is a comprehensive date and time handling library for Rust, providing Date, Time, PrimitiveDateTime, OffsetDateTime, Duration, and UtcOffset types built around correctness and ergonomics. It supports both a runtime format-description parser and compile-time macros (date!, time!, datetime!, format_description!) for zero-cost literal construction.

The crate is no_std-compatible (with an alloc feature for heap-using functionality), integrates with serde for serialization, and offers optional interop with rand, quickcheck, and JavaScript’s Date via js-sys for WASM targets. It is one of the most widely used date/time crates in the Rust ecosystem, serving as a lower-level alternative or complement to chrono.

What You Get

  • Core types for Date, Time, PrimitiveDateTime, OffsetDateTime, UtcDateTime, Duration, and UtcOffset
  • Compile-time macros (date!, time!, datetime!, format_description!) for validated literal construction
  • A configurable format-description system for parsing and formatting dates/times at runtime
  • no_std support (with an alloc feature) for embedded and constrained environments
  • Optional serde, rand, and quickcheck integrations for serialization and property-based testing
  • A companion time-macros crate providing the proc-macro implementations used by the main crate

Common Use Cases

  • Representing and manipulating timestamps in a Rust backend service without pulling in a full chrono dependency
  • Parsing and formatting dates/times from external APIs using configurable format descriptions
  • Validating date/time literals at compile time via macros to catch invalid dates before runtime
  • Using date/time types in no_std or embedded Rust projects where the standard library isn’t available

Under The Hood

Architecture - The time workspace splits responsibilities across three crates: time-core (shared internal primitives), time-macros (proc-macros for compile-time literal validation), and the main time crate exposing public types like Date (date.rs), OffsetDateTime (offset_date_time.rs), and SignedDuration/Duration (signed_duration.rs), with dedicated parsing/ and formatting/ modules implementing the format-description engine. Tech Stack - Pure Rust with a 2024 edition and MSRV of 1.88.0, using deranged for range-constrained integers, powerfmt for formatting helpers, num-conv for safe numeric conversions, and optional dependencies on serde, rand (multiple versions supported via feature flags rand08/rand09/rand010), quickcheck, and js-sys for WASM/JS interop. Code Quality - The time crate has an extensive test suite (43 test files under src/tests.rs and submodules) plus quickcheck-based property tests (quickcheck.rs) for randomized validation of date/time arithmetic; the project publishes a coverage badge via Codecov and maintains a documented MSRV policy guaranteeing compatibility with the two prior stable Rust releases. API Design - The crate favors compile-time-checked macros (date!(2024-01-01)) over runtime-fallible constructors where possible, reducing a whole class of invalid-date bugs; comprehensive documentation is published both on docs.rs and a dedicated ‘book’, and the maintainer explicitly documents an AI usage policy (AI_POLICY.md) for contributions.

Used by 22 apps in this directory

Rust
60%
Apache 2.0

Magnitude

AI Development · Developer Tools

7,313

An open source inference engine that profiles your hardware, recommends the best local models, and tunes them for the coding agent you already use.

View details
79
Repo Health
83
Technical
71
Dependency
Built with
Rust 60%
TypeScript 25%
Updated 5 days ago
Rust
100%
Other

Meilisearch

Search

59,644

Lightning-fast hybrid search engine with AI-powered semantic and full-text retrieval for modern applications.

View details
90
Repo Health
88
Technical
67
Dependency
Built with
Rust 100%
Updated 6 days ago
TypeScript
88%
MIT

Mistle

AI Agents · Developer Tools

95

Self-hostable platform for running autonomous coding agents in isolated, credentialless sandboxes with brokered credentials, reusable snapshots, and event-driven triggers.

View details
50
Repo Health
76
Technical
70
Dependency
Built with
TypeScript 88%
Rust 11%
Updated 3 weeks ago
Rust
59%
GPL 3.0

openfootmanager

Game Development

1,161

A free and open source football management simulation game built with Rust and Tauri, inspired by Football Manager.

View details
94
Repo Health
79
Technical
73
Dependency
Built with
Rust 59%
TypeScript 40%
Updated 1 weeks ago
Rust
85%
AGPL 3.0

ParadeDB

Analytics · Databases · Search

9,436

Born out of Y Combinator's S2023 batch, ParadeDB is a Postgres extension that delivers Elasticsearch-quality BM25 search and real-time analytics without a separate search cluster to manage.

View details
89
Repo Health
87
Technical
68
Dependency
Built with
Rust 85%
PLpgSQL 15%
Updated 5 days ago
Rust
63%
MIT

PostgresML

AI Development · Databases

6,823

Run ML training and LLM inference natively inside PostgreSQL with GPU acceleration — no data movement required.

View details
51
Repo Health
76
Technical
64
Dependency
Built with
Rust 63%
JavaScript 11%
Updated 1 years ago
Rust
98%

Stalwart

Collaboration

15,268

All-in-one secure mail and collaboration server covering IMAP, JMAP, SMTP, CalDAV, CardDAV, and WebDAV in a single memory-safe Rust binary.

View details
88
Repo Health
81
Technical
65
Dependency
Built with
Rust 98%
Updated 1 weeks ago
Rust
46%
MIT

Svix

Automation · Developer Tools

3,463

Open source, self-hostable webhook infrastructure that handles delivery, retries, HMAC signing, and multi-tenant event management so you never have to build a webhooks system from scratch.

View details
91
Repo Health
77
Technical
67
Dependency
Built with
Rust 46%
C# 16%
Updated 6 days ago
Rust
66%
Apache 2.0

Temps

Analytics · Devops · Monitoring

865

A self-hosted Rust PaaS that replaces Vercel, Sentry, PostHog, Pingdom, Resend, and E2B with one binary — plus 440+ CLI operations agents like Claude Code can drive directly.

View details
81
Repo Health
86
Technical
66
Dependency
Built with
Rust 66%
TypeScript 33%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers