Skip to content

cron: --at ignores --tz flag, bare ISO datetimes default to UTC #53218

@RolfHegr

Description

@RolfHegr

Bug

openclaw cron add --at '2026-03-23T23:00:00' --tz Europe/Oslo schedules the job at 23:00 UTC, not 23:00 Oslo time. The --tz flag is silently ignored for --at jobs.

Expected behavior

If --tz is provided, bare ISO datetimes (without offset) should be interpreted in that timezone. If no --tz is provided, the system timezone or a sensible default should apply.

Current behavior

parseAt() passes the input to parseAbsoluteTimeMs()new Date(), which treats offset-less ISO strings as UTC. The --tz flag only applies to cron expressions (line 354: *"--stagger/--exact/--tz are only valid for cron schedules"*).

Workaround

Include the UTC offset explicitly: --at '2026-03-23T23:00:00+01:00'

Suggested fix

  1. When --tz is provided with --at, use it to interpret the datetime
  2. Or: when the input has no offset, apply the system's local timezone instead of UTC
  3. At minimum: update the help text for --at to say *"ISO with offset, or +duration. Bare datetimes are treated as UTC; use offset like +01:00 for local time"*

Impact

Reminders/one-shot jobs fire at the wrong time. Users assume their local timezone applies (natural expectation), and the job runs 1-2 hours off.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions