[fpc-devel] NowUTC in FPC
Michael Van Canneyt
michael at freepascal.org
Sat Jul 30 18:45:18 CEST 2016
On Sat, 30 Jul 2016, Denis Kozlov wrote:
> On 30/07/2016 11:10, Michael Van Canneyt wrote:
>> I had a look at it. Please modify the patch first, see comments in
> The reason why I put UniversalTime (a.k.a. NowUTC) function in DateUtils is
> because of the dependency on LocalTimeToUniversal, UnixToDateTime,
> IncMilliSecond functions.
As far as I can see, these perform almost the same function as EpochToLocal in
You can perfectly do these additions manually.
> I presumed that DateUtils cannot (or must not) be added to the uses section
> of SysUtils.
Indeed it cannot.
> What would you recommend?
I don't see why you cannot perform simple additions in sysutils.
The reverse, introducing system dependent system calls in dateutils, is a
much worse solution. DateUtils is for simple date/time calculations, not for
performing OS calls.
More information about the fpc-devel