coreutils
coreutils copied to clipboard
Some datetime timezone combinations don't parse
We've started to notice some parsing errors on Ubuntu with some specific date and timezone combinations. Those combinations do work against gnu coreutils. e.g.
# This one doesn't work:
TZ=America/Toronto date -d "$(LC_ALL=C TZ=UTC0 gnudate -d 'Fri Oct 31 22:52:02 UTC 2025')"
date: invalid date 'Fri Oct 31 22:52:02 UTC 2025'
#While the same datetime works for paris:
TZ=Europe/Paris date -d "$(LC_ALL=C TZ=UTC0 gnudate -d 'Fri Oct 31 22:52:02 UTC 2025')"
Fri Oct 31 23:52:02 CET 2025
#While the first TZ works with some different date:
TZ=America/Toronto date -d "$(LC_ALL=C TZ=UTC0 gnudate -d 'Wed Oct 21 22:52:02 UTC 2025')"
Wed Oct 22 00:52:02 CEST 2025
Ref: https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/2130471
Looks like failures are every other 31st.
for i in `seq 1000`; do TZ=America/Toronto date -d "$(LC_ALL=C TZ=UTC0 gnudate -d "Fri Oct 31 22:52:02 UTC 2025 + $i day")" > /dev/null ; done
date: invalid date 'Sat Jan 31 22:52:02 UTC 2026'
date: invalid date 'Tue Mar 31 22:52:02 UTC 2026'
date: invalid date 'Sun May 31 22:52:02 UTC 2026'
date: invalid date 'Mon Aug 31 22:52:02 UTC 2026'
date: invalid date 'Sat Oct 31 22:52:02 UTC 2026'
date: invalid date 'Sun Jan 31 22:52:02 UTC 2027'
date: invalid date 'Wed Mar 31 22:52:02 UTC 2027'
date: invalid date 'Mon May 31 22:52:02 UTC 2027'
date: invalid date 'Tue Aug 31 22:52:02 UTC 2027'
date: invalid date 'Sun Oct 31 22:52:02 UTC 2027'
date: invalid date 'Mon Jan 31 22:52:02 UTC 2028'
date: invalid date 'Fri Mar 31 22:52:02 UTC 2028'
date: invalid date 'Wed May 31 22:52:02 UTC 2028'
podman run --rm ubuntu:25.10 /bin/bash -c "apt update && apt install -y tzdata && TZ=America/Toronto date -d 'Fri Oct 31 22:52:02 UTC 2025'"
date: invalid date 'Fri Oct 31 22:52:02 UTC 2025'
December 31st is coming. People will have problems again parsing that date.
not quite yet, December and July are impervious due to being the first of consecutive 31day months. Jan 31 is going to fail though.