Hi, I am embellishing a Multi Device program I wrote in Delphi 11. This is an FMX program. I am using this to get the local time:
TimeStr := DateTimeToStr(TTimeZone.Local.ToLocalTime(Now)); The date and time are correct, except that the time shown is 5 hours early. I checked the time/date settings on this computer, a Windows 10 Dell laptop, Everything is correct. Correct Date, Time, Time Zone. The computer displays the correct local time and date. DateTimeTo Str gives the correct date, minutes and seconds. But it shows a time 5 hours early.
However, this: TimeStr := DateTimeToStr(TTimeZone.Local.ToUniversalTime(Now));
gives me the correct GMT(UCT, Zulu) time (Eastern Standard time + 5 hours).
http://delphitipsandtricks.blogspot.com/2013/05/convering-utc-to-local-time-and-vice.html