New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DateTimeElement displays wrong date for current locale #111
Comments
Done a bit more investigation and the problem is actually in the implicit conversion between NSDate and DateTime. The following code replicates the problem:
That produces the following output:DateTime=29/07/1975 12:00:00 AM |
Added fix in my fork: |
Actually the conversion is correct, you're not taking into account that the first DateTime= line has Kind=Unspecified, while the last has Kind=Utc. I get this output if I add that information: |
This has been fixed now. |
To reproduce this issue, set iPhone simulator settings in General | International to:
_Region Format = _Australia**
The run the Sample and go to:
Reflection API | Time Samples
As you can see the Alarm text says 6:30P even though in the code we have set it to 7:30AM.
When you click on it the picker initialises the time to 7:30AM.
Also, if you set the birthday to 29 July 1976 the application output displays:
Birthday: 28/07/1976 2:00:00 PM
The text was updated successfully, but these errors were encountered: