-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Taiwanese locale (zh-Hant-TW) does not parse datetime correctly as expected on Android 13+ #110044
Comments
@grendello is this us or the runtime team? |
@dellis1972 it's the runtime team, we no longer have any TZ-specific code in our repo |
Tagging subscribers to 'arch-android': @vitek-karas, @simonrozsival, @steveisok, @akoeplinger |
Tagging subscribers to this area: @dotnet/area-system-datetime |
@yma44 Thank you for filling the issue. I will need more information to be able to help you resolve the issue. I tried locally on Android API 33 emulator and I got the expected output:
Could you please share more information about your device (API level, ICU version). Also does the issue reproduce on emulators with the same OS version or is it limited to specific physical devices? |
This issue has been marked |
Description
We have issue which string with "PM" does not parsed correctly when a device locale is set to Taiwanese (zh-Hant-TW) on Android 13+.
DateTime.TryPase returns true, but output value is not correct. Even though 1PM is passed to the TryParse method, the output is 1am.
This is the code:
dateTime variable before calling this method : 0001/1/1 12:00:00
dateTime variable after calling this method : 2024/11/18 1:00:00
If we use Android 12, the output is correct.
dateTime variable before calling this method : 0001/1/1 上午12:00:00
dateTime variable after calling this method : 2024/11/18 下午1:00:00
If we use other Chinese locales (e.g. Hong Kong Chinese) there is no issues.
I am using Microsoft Visual Studio Enterprise 2022 (64-bit) - Current
Version 17.8.1,
but also tried Microsoft Visual Studio Enterprise 2022 (64-bit) - Preview
Version 17.11.0 Preview 2.1, still got the same issue.
These are the full details of VS.
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
Unknown/Other
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 14 and above.
Did you find any workaround?
No response
Relevant log output
The text was updated successfully, but these errors were encountered: