[fpc-devel] NowUTC in FPC
dezlov at gmail.com
Wed Jul 20 14:49:11 CEST 2016
On 20 July 2016 at 13:31, Marco van de Voort <marcov at stack.nl> wrote:
> In our previous episode, Denis Kozlov said:
> > Is it possible to move NowUTC from LazUTF8SysUtils.NowUTC to FPC, e.g.
> > DateUtils?
> > LocalTimeToUniversal(Now) is inefficient and suffers from a race
> > but can still be used as a fallback implementation.
> Isn't that horribly misnamed? It seems to get system time without
> timezone corrections by FPC, but there is no guarantee that that is UTC?
Do you mean "NowUTC" is misnamed? Sure, just as many other things, but
consistency is gold-ish ;)
I'm not sure why you say there is no guarantee, because in example of
Windows implementation GetSystemTime API is explicitly expressed in UTC
according to MSDN.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel