[Lazarus] Is there a function that returns UTC time in FPC or Lazarus?

João Marcelo Vaz jmsvaz at gmail.com
Sat Mar 31 02:56:46 CEST 2012


2012/3/30 Reinier Olislagers <reinierolislagers at gmail.com>

> On 30-3-2012 16:05, Frank Church wrote:
> > When I get the time via the DateTime function result is adapted for
> > the timezone, making it an hour ahead now?
> >
> > Is there a function that returns the UTC time, either as a UnixTime or
> > TDateTime irregardless of timezone?
> >
> Frank,
>
> You could search the fpc and lazarus mailing list; I know there've been
> posts regarding this.
> IIRC, the conclusion was that doing this is potentially very difficult
> to do cross platform, keeping daylight saving changes etc in mind.
>
> There is a separate unit that deals with this, IIRC, the wiki mentions
> it somewhere..
>
> Regards,
> Reinier
>
> --
>

PascalTZ does that.

http://wiki.lazarus.freepascal.org/PascalTZ


-- 
João Marcelo
http://blog.caixadepandora.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120330/4e233ecb/attachment-0003.html>


More information about the Lazarus mailing list