To reset the time on the emulator you can delete it and re-add it or do a factory reset on the emulator to get the correct time.
Android emulator does not do DateTime.Now correctly
I have a control that will show a list of items for a day. If the time when the app is run is before noon it will show the last day's items and after noon it will show items for that day.
Now I am not sure if this ever worked as to test I created my own DateTime so it would work.
When I take out the line to set the time I get the following:
3/13/2023 1:26:08 PM from DateTime.Now
3/13/2023 2.04 PM is actual time.
Now I thought it might have to do with Daylight saving time but the difference is about 38 mins so I have no idea what is happening. I created a WPF app and put the DateTime.Now in it and it returns the correct DateTime. I first thought that I needed to set a timezone for the emulator but 38 mins is not a resetable time that I know of.
I assume that the returned DateTime is set by the code running in the emulator. If I run the code using my phone the return value of .Now is correct.
Any ideas as I will have other requirements that are time dependent.