smoital
A Rust library for practical Martian timekeeping compatible with Earth-based ISO8601 standards.
Based on the 2025 paper "The Smoital System" by Ben Joffe, this library implements a system that allows Martian colonies to track Mean Solar Time using standard Earth computing primitives (UTC offsets and IANA timezones).
The Concept
Designing a timekeeping system for Mars balances familiarity with Earth conventions against the reality of a 24h 39m 35s Martian day (Sol).
The Smoital System solves this by defining nearly all Martian calendar days as exactly 24 hours and 40 minutes long (Standard Days), compensated by inserting 6 or 7 "Smol Days" (24 hours exactly) per Martian year.
Instead of redefining the second or minute (which breaks software compatibility), Smoital relies on strategic UTC Timezone Offsets:
- Standard Days: The timezone shifts back by 40 minutes daily to accommodate the longer day.
- Smol Days: Occur specifically on the $37^{th}$ day of a 37-day "Smonth" and are fixed at UTC-12:00.
- Interoperability: Allows Mars time to be stored in standard SQL databases and displayed on legacy OS clocks without modification.
Features
- Heuristic Smonth Scheduling: Implements the algorithm to determine the 36/37-day month pattern for any Martian year.
- Equatorial Schedule: Pre-configured schedule optimized for equatorial settlements (consistent 36/37 day pattern).
- Optimized Clock Display: Logic to disambiguate the "Extra 40 Minutes" (XM) that occur when a timezone shifts back.
- Precise Durations:
MarsDurationtypes using the exact Mars/Earth ratio ($1.02749125$). - IANA Rule Generation: Utilities to generate standard IANA timezone file formats for OS integration.
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
= "0.4"
Usage
1. Determining Martian Timezone Offsets
Calculate the correct UTC offset for any day of the year using the Equatorial Schedule.
use ;
2. The "Optimized" Clock (Handling the 24:40 Day)
On Mars, a standard day is 24h 40m. Standard Earth clocks will repeat the time 23:20 to 23:59 when the timezone shifts back. The SmoitalClock provides unambiguous display formats for this "Gap".
use ;
use ;
3. Precise Mars Duration
Handle scientific calculations using the exact Earth-to-Mars second ratio.
use MarsDuration;
4. Working with a Calendar Year
Tie a schedule to a specific year so you can navigate between day_of_year values and SmoitalDate instances.
use ;
Background
The "Smol" Day
To keep the calendar synchronized with the actual solar day, Smoital introduces Smol Days. These are days where the "extra" 40 minutes are omitted.
- Frequency: ~6 or 7 times per Martian Year.
- Identification: Always the $37^{th}$ day of a Smonth.
- Result: A built-in correction for Mars' highly variable Equation of Time.
Smonths
A "Smonth" (Synodic Month) is a period of 36 or 37 days. It represents the time it takes for the timezone offset to cycle from UTC+12:00 to UTC-12:00.
- Standard Smonth: 36 Days (Days 1-36).
- Long Smonth: 37 Days (Days 1-37). The 37th day is a Smol Day.
License
This project is licensed under the Apache-2.0 License.