Mon Mar 12 00:01:00 2012 $ TZ=CEST ./a.out Error: unable to make time using mktime: Value too large for defined data type $ TZ=UTC ./a.out Error: unable to make time using mktime: Value too large for defined data type
Context: test_email of Python 3.7.1 started to fail on Fedora Rawhide. I reported the bug upstream:
https://bugs.python.org/issue35317
> Mon Mar 12 00:01:00 2012
> $ TZ=CEST ./a.out 
> Error: unable to make time using mktime: Value too large for defined data
> $ TZ=UTC ./a.out 
> Error: unable to make time using mktime: Value too large for defined data
The behavior is at least inconsistent because there is no DST in effect at this time in all three cases, so tm_isdst == 1 is invalid input.
I'm not sure that it's a bug. mktime() fails with TZ=UTC on the same date on FreeBSD since 2012 (FreeBSD 8.2, I can reproduce the bug on FreeBSD 12.0-RC2):
https://bugs.python.org/issue35317#msg330443
Moreover, I proposed a fix for test_email of Python:
https://github.com/python/cpython/pull/10721
(In reply to Florian Weimer from comment #2)
> (In reply to Miro Hrončok from comment #0)
> >    info.tm_isdst = 1;
> > $ TZ=CET ./a.out 
> > Mon Mar 12 00:01:00 2012
> > $ TZ=CEST ./a.out 
> > Error: unable to make time using mktime: Value too large for defined data
> > $ TZ=UTC ./a.out 
> > Error: unable to make time using mktime: Value too large for defined data
> The behavior is at least inconsistent because there is no DST in effect at
> this time in all three cases, so tm_isdst == 1 is invalid input.
CEST is with DST. The S stands for Summer as in daylight saving.
(In reply to Miro Hrončok from comment #4)
> (In reply to Florian Weimer from comment #2)
> > (In reply to Miro Hrončok from comment #0)
> > >    info.tm_isdst = 1;
> > > $ TZ=CET ./a.out 
> > > Mon Mar 12 00:01:00 2012
> > > $ TZ=CEST ./a.out 
> > > Error: unable to make time using mktime: Value too large for defined data
> > > $ TZ=UTC ./a.out 
> > > Error: unable to make time using mktime: Value too large for defined data
> > The behavior is at least inconsistent because there is no DST in effect at
> > this time in all three cases, so tm_isdst == 1 is invalid input.
> CEST is with DST. The S stands for Summer as in daylight saving.
Ah, that explains it.  CEST is actually an alias for UTC.