-
Notifications
You must be signed in to change notification settings - Fork 116
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
add support for MS timezone names, and support for TZ not UTC (said ToDo) #114
base: master
Are you sure you want to change the base?
Conversation
i think this PR will fail for the same reason as #111 , as I add a dependency (install time, and a file to read at runtime) |
function getIanaTZFromMS(msTZName){ | ||
if(!zoneTable){ | ||
const fs=require('fs') | ||
const wtz=JSON.parse(fs.readFileSync(__dirname+"/windowsZones.json")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You did not include the file windowsZones.json
in your commit.
@DennisGaida I don't understand.. its been in the repo for a long time.. I provided it back in 2020
|
i do not see the file in the current file list, but the last commit related to the the file was in 2021. |
ms timezones are different from IANA. there is a table maintained by unicode.org that maps to IANA timezones. (xml format)
add post install to download and convert (using xml-js module) to json, so file is present if needed
add support to load table as lookup IF ms timezones are detected (they have spaces), and use it to map back to IANA
added test ics and testcase
use moment-timezone to set date per the ics w timezone, which gets date() in utc as required.
also handles (????+offset) timezones..
also TZID="america/pacific:20201005080000" (#65)
fixes #50 #65 #68 #76 #115