Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all articles
Browse latest Browse all 3212

FMX/Android: current time is wrong

$
0
0

Using FMX/Delphi 10.2 Version 25.0.29899.2631 (10.2 update 3):

On Android, if I use:

Memo1.Lines.Add(DateTimeToStr(Now));

or


Memo1.Lines.Add(TimeToStr(Time));

I will get a time that is one hour earlier than the time in the status bar of my mobile phone (Huawei P9 Lite, Android 7.0).

Maybe it is because of day light saving or difference between UTC and my time zone (CET), but i find this strange since Now and Time should give the local time (i.e. the one in the status bar).

So how do I get the same time  as shown in the status bar on Android?

 


Viewing all articles
Browse latest Browse all 3212

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>