Skip to content
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

Datetime formatting issue #4164

Merged
merged 2 commits into from
Apr 23, 2024
Merged

Datetime formatting issue #4164

merged 2 commits into from
Apr 23, 2024

Conversation

ohba-ikuo
Copy link
Contributor

Oqtane Info

Version - 5.1.1
Render Mode - Static
Interactivity - Server
Database - SQL Server

Describe the bug

When transitioning to visitor management in the Japanese location, an application error occurs.
datetime-format-issue-screen
[Event Log]
datetime-format-issue

Expected Behavior

It is believed that an error will always occur when transitioning to Visitor Management in locations that use multibyte characters.

Steps To Reproduce

Anything else?

@ohba-ikuo
Copy link
Contributor Author

ohba-ikuo commented Apr 21, 2024 via email

@leigh-pointer
Copy link
Contributor

Hi @ohba-ikuo are you using Oqtane with the default language or have you created a Japanese language pack?

@sbwalker
Copy link
Member

@ohba-ikuo thank you for reporting. I can see that multi-byte characters can cause some Internationalization challenges when using MMM format. The reason why the dd-MMM-yyyy format was chosen was so that there would be no ambiguity between months and days. For example, is 2023-03-01 equivalent to March 1 or January 3? I assume that the date needs to be encoded and decoded using the same Culture for this to work properly - which is not being explicitly specified in Oqtane currently as it is using DateTime.Parse(fromdate).

@ohba-ikuo
Copy link
Contributor Author

@sbwalker
Thank you for your response. I now understand why you are using the "dd-MMM-yyyy" format for the date.

@ohba-ikuo
Copy link
Contributor Author

ohba-ikuo commented Apr 23, 2024 via email

@sbwalker
Copy link
Member

Thank you for making these changes... this is the recommended pattern for handling i18n (internationalization) for dates and it works well in Urls because there are no extended characters which need to be encoded.

@sbwalker sbwalker merged commit 24dcb99 into oqtane:dev Apr 23, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants