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 bugreport.

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
sysutils/unix.

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.

Michael.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to