I have a issue.
When I change the device date time and run the App, the code DateTime.Now don't return the new date, it returns the old date.
How can I get the device date time?
Are you REALLY sure?
@AlessandroCaliaro yes, sure. I thinks the Xamarin get the timezone, not the device date time. I need the device time.
Never seen such a thing. I'm with @AlessandroCaliaro in disbelief.
Tested several times. I reboot the device and nothing happens, the DateTime.Now dont take the device date time.
Then you're probably the only person with that happening... anywhere.
I have a solution out there in 20,000 vehicles across all USA timezones. If DateTime.now() didn't work, I'd have heard about it long ago.
Are you sure you have not "Automatic date time" set?
I am also facing the same issue:
DateTime StartDate = DateTime.Now; // Today is 12/10/2018 but returning 11/10/2018
I missed, it is Emulator not your local machine i.e. DateTime of Emulator. All good...
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies