Lazarus

Installation => General => Topic started by: mrdebug on November 13, 2007, 04:43:18 pm

Title: System time
Post by: mrdebug on November 13, 2007, 04:43:18 pm
Is there a CrossPlatform function to modify System DateTime?

Thanks!
Title: RE: System time
Post by: Leledumbo on November 14, 2007, 05:36:23 am
See DateUtils unit. Find what you want there, probably the ones started with Encodexxx & Decodexxx.
Title: System time
Post by: mrdebug on November 14, 2007, 08:56:10 am
Is there a function like SetSystemTime (Delphi) to change the System DateTime?
Title: System time
Post by: Leledumbo on November 14, 2007, 10:08:10 am
Well, after searching for a while, I don't seem to find one. You can add Windows unit to your uses to use that function, but it's not cross-platform.
Title: System time
Post by: pch on November 15, 2007, 11:55:51 am
I add such a function that work at least for Windows and Linux when I rework the NTP functions of Synapse.some years ago.
It must be in synautil unit now.

But remember your user must be root or administrator to use that !
TinyPortal © 2005-2018