storkit: create 466_bug_timer_uses_container_utc_timezone_instead_of_host_local_timezone
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: "Timer uses container UTC timezone instead of host local timezone"
|
||||||
|
---
|
||||||
|
|
||||||
|
# Bug 466: Timer uses container UTC timezone instead of host local timezone
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
The `next_occurrence_of_hhmm` function uses `chrono::Local::now()` to interpret the user's HH:MM input. However, the server process runs inside a container (OrbStack/Docker) where the timezone is UTC, not the host's local timezone. This means `Local` == UTC for the server, so when a user in UTC+1 types `timer 463 12:45`, the timer is scheduled for 12:45 UTC instead of 12:45 local (11:45 UTC). The timer fires an hour late from the user's perspective.
|
||||||
|
|
||||||
|
The `TZ` environment variable is not set in the container, so `Local` defaults to UTC.
|
||||||
|
|
||||||
|
## How to Reproduce
|
||||||
|
|
||||||
|
1. Run storkit in a container where TZ is unset (defaults to UTC)
|
||||||
|
2. Be in a non-UTC timezone (e.g. UTC+1 / CET)
|
||||||
|
3. Set a timer: `timer 463 12:45`
|
||||||
|
4. Observe the stored `scheduled_at` in timers.json
|
||||||
|
|
||||||
|
## Actual Result
|
||||||
|
|
||||||
|
Timer stores `12:45:00Z` (UTC). Fires at 13:45 local time — one hour late.
|
||||||
|
|
||||||
|
## Expected Result
|
||||||
|
|
||||||
|
Timer stores `11:45:00Z` (12:45 local converted to UTC). Fires at 12:45 local time as the user intended.
|
||||||
|
|
||||||
|
## Acceptance Criteria
|
||||||
|
|
||||||
|
- [ ] Timer HH:MM input is interpreted in the host's actual local timezone, not the container's UTC
|
||||||
|
- [ ] Options: set TZ in the container to match host, add a timezone config field to project.toml, or accept timezone offset in the timer command
|
||||||
|
- [ ] Timer confirmation message shows the correct local time
|
||||||
Reference in New Issue
Block a user