Skip to content
This repository was archived by the owner on Dec 21, 2022. It is now read-only.

Convert SQL Time to ISO 8601, Safari Time Support#112

Open
ochan1 wants to merge 2 commits intosnap-cloud:masterfrom
ochan1:safari_date_format
Open

Convert SQL Time to ISO 8601, Safari Time Support#112
ochan1 wants to merge 2 commits intosnap-cloud:masterfrom
ochan1:safari_date_format

Conversation

@ochan1
Copy link
Contributor

@ochan1 ochan1 commented Nov 5, 2021

Safari had a problem supporting the time format outputted by the SQL Server through Lua

Safari's JavaScript interpreter for the Date class doesn't support the SQL Server format: YYYY-MM-DD HH:MM:SS-TZ:tz (where TZ:tz is Hour and Minutes of Time Zone)

We can luckily convert this time to the ISO 8601 time string format easily: YYYY-MM-DDTHH:MM:SS-TZ:tz, where "T" is between the date and time+timezone in the string

We replace the first space in the time string with "T", which is between the date and time+timezone in the string

There's no expectation for the user to modify this or any other part of the code to modify this, so the input format can be assumed to be the same

@ochan1
Copy link
Contributor Author

ochan1 commented Nov 6, 2021

Verified new changes
They work on the Safari browser and show the dates correctly

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants