[Development] How does mktime() handle DST transitions ?

André Somers andre at familiesomers.nl
Thu Nov 5 14:54:04 CET 2015

Op 5-11-2015 om 00:06 schreef Kevin Kofler:
> Welbourne Edward wrote:
>> I'm looking into QTBUG-49008 and need to work out how diverse
>> implementations of mktime handle DST transitions: at one end of the year
>> there's a gap (where 1:59 is followed by 3:00), at the other end there's
>> a duplicated hour (where 2:59 is followed by a reprise of 2:00 in
>> Europe, or 1:59 by 1:00 in the USA, IIUC).  While we still need to work
>> out what behaviour *we* want to give, implementing it is going to depend
>> on knowing what the platform mktime gives us to work with.
> The EU actually defines the switchover time in UTC, so which hour is
> duplicated depends on the actual time zone. It's the 3:mm hour in CET/CEST.

Actually, you are right about the sync in the EU (for all clocks) and 
about the hour that is duplicated depending on the time zone, but I 
think you are off on the hour it happens. In CET it is 2:mm that is 
duplicated, in GMT and WET it is 1:mm and in finland (EET) it is 3:mm 
that is duplicated.


Interesting, I did not know that the summertime adjustment is 
synchronized in the EU. Interesting little factoid :-)


More information about the Development mailing list