Android Question DateTime.Time(DateTime.Now) shows incorrect time (UK - British Summer Time)

yonson

Active Member
Licensed User
Longtime User
Hi,
I've noticed a bug with my app which I've traced back to the following :-

DateTime.Time(DateTime.Now) is giving the wrong time, this is a problem with the UK / British Summer Time setting whereby for half of the year, the clocks are pushed forward for an hour.

So, currently DateTime.Time(DateTime.Now) gives (for example) 4.30pm, whereas on my actual phone display it is showing 5.30pm.

I was wondering what I can do to get round this problem, all I need is the current time as used / displayed by the phone and my understand was that DateTime.Time(DateTime.Now) always worked for this?

I'm sure other UK based apps will run into this problem so would be good to establish a workaround solution, if anyone could suggest something I'll put a method call together for this and post it here

Any help much appreciated!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…