[Lazarus] UnixToDateTime and time zone

J├╝rgen Hestermann juergen.hestermann at gmx.de
Thu Sep 16 19:49:18 CEST 2010


Krzysztof schrieb:
> I have a problem. Example this unix timestamp: 1280166617. 
> DateTimeToString(UnixToDateTime(1280166617)) should give me 2010-07-26 
> 19:50:17 (in country: Poland) but it give me 2010-07-26 17:50:17. I must 
> add two hours:

As far as I know UnixTime is a global time.
It's UTC time format.
See http://en.wikipedia.org/wiki/Unix_time

So if you want a local time you need to adjust 
according to the local time zone.





More information about the Lazarus mailing list