Skip to content

Panic with --mtime/--atime/--ctime on DST change days #641

Closed

Description

@Ahmed0427

When local midnight is ambiguous or skipped because of a DST change,
dust panics if any of the time filters is used.

Repro (Egypt moved clocks back at 24:00 on 2025-10-30):

TZ=Africa/Cairo faketime '2025-10-31 12:00' dust --mtime 0 .

thread 'main' panicked at src/config.rs:218:10:
Ambiguous local time, ranging from 2025-10-31T00:00:00+02:00
to 2025-10-31T00:00:00+03:00

The cause is the .unwrap() on Local.from_local_datetime() in
get_current_date_epoch_seconds().

On the spring-forward day (2025-04-25) midnight does not exist at all,
and test_get_current_date_epoch_seconds fails there too.

Activity

  1. bootandy commented on Nov 1, 2026

    @bootandy
    Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions