[Interest] Relashionship between time_t and QDateTime

Constantin Makshin cmakshin at gmail.com
Tue Aug 27 23:01:55 CEST 2013

The original Calogero's message mentioned a file from December 2007, a
date outside of DST (unless there's a country that uses DST during
winter). Now it's August, so the DST is active and during "UTC -> local
time" conversion Windows adds that 1 hour Calogero is seeing. DST gets
incorrectly applied because it's active at the moment of conversion,
although it wasn't used at the moment the original timestamp represents.

I bet that the problem will go away when DST ends [again]. :)

On 08/27/2013 11:42 PM, Thiago Macieira wrote:
> On terça-feira, 27 de agosto de 2013 22:59:44, Constantin Makshin wrote:
>> Windows can store information about daylight saving transitions for past
>> years, but always uses one for the current year. And since daylight
>> saving transition dates and time tend to slightly drift from year to
>> year, there's absolutely no guarantees of getting correct time
>> conversion results; in general case 1-hour error is nearly inevitable.
>> If you're on Windows, either calculate and apply DST yourself or forget
>> about correct "UTC <-> local time" conversions.
> This is not about the corner case of a file that was created in the hour of the 
> transition, or even in the week that shifted between non-DST in one year to 
> DST in another (or vice-versa).
>>From what I understand, we're talking about a file created in DST and checked 
> outside of DST (or vice-versa) in the *same* *year*.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130828/41d81990/attachment.sig>

More information about the Interest mailing list