DocsOperations
Application timezone
Give business calendars one explicit IANA timezone while keeping stored timestamps, expirations, signatures, and durations absolute.
Configure one business calendar
APP_TIMEZONE="America/Santo_Domingo"A missing or blank value means UTC. Names are case-sensitive IANA identifiers; an invalid configured name stops startup rather than silently changing business dates. The scaffold resolves and installs it before schedulers or requests begin.
Read and convert time
let local_now = rahti::time::now();
let local_date = rahti::time::today();
let zone = rahti::time::timezone();
let shown = rahti::time::to_app_time(stored_utc);
let (start, end) = rahti::time::day_bounds_utc(local_date)?;| Helper | Purpose |
|---|---|
| now / today / timezone | Current aware time, calendar date, and installed zone. |
| to_app_time | Show an aware stored instant in the application calendar. |
| from_naive_utc / as_naive_utc | Make a database driver's naive UTC contract explicit. |
| day_bounds_utc | Half-open UTC range for one application-local calendar day. |
Local days can span 23 or 25 hours across daylight-saving transitions. Query with created_at >= start && created_at < end so adjacent days share one boundary without double-counting.
Daily scheduling
Scheduler::daily follows the installed application timezone. On a fall-back ambiguity it selects the earlier occurrence and runs once; during a spring-forward gap it advances to the first valid minute. Use daily_utc when infrastructure work is intentionally tied to UTC.
