Skip to content
Code Recycle
← Collections

My dates are off by one

Off by a day, an hour, or a whole DST transition. Every one of these produces a valid date — just not the right one.

Curated by Code Recycle Editorial

  1. 1

    On the spring-forward day a 02:30 job never runs, and most schedulers skip it silently.

    Why it's here: On the spring-forward day a 02:30 job never runs, and schedulers skip it silently.

  2. 2
    Recurrence Anchor IntegrityComponent✓ from $19

    Every date library gets one occurrence right. The drift appears across a SERIES -- a billing date that walks off its anchor, one hour or one day at a time.

    Why it's here: A billing date that walks off its anchor, one hour or one day at a time.

  3. 3

    Daily metrics computed in UTC are wrong for a whole timezone, and DST days do not have 24 hours.

    Why it's here: DST days do not have 24 hours, and daily buckets assume they do.

  4. 4
    SheetJS Cell Type VerdictComponent✓ from $19

    Excel stores a date as a number. Every SheetJS read has to guess what you meant, no option is right for every cell, and each wrong answer is a valid value of some other type.

    Why it's here: A date reads back as 46085 — and the fix buys you a timezone shift instead.

  5. 5
    Retry After VerdictComponent✓ from $19

    A wrong retry-wait does not throw. It returns a plausible number, and the loop either hammers a server that asked for hours or sleeps through the window.

    Why it's here: A plausible wrong wait: hammer a server that asked for hours, or sleep through the window.