moment-timezone icon indicating copy to clipboard operation
moment-timezone copied to clipboard

Pre-built bundles have data mismatch with data files

Open Etchelon opened this issue 4 years ago • 1 comments

Moment-timezone version which you use:

Version: 0.5.32 (latest right now)

Note: many issues are resolved if you just upgrade to the latest version

Issue description:

node_modules/moment-timezone/builds/moment-timezone-with-data.js

contains, for the "GL" country, the America/Godthab timezone, which has been deprecated, in fact all data files (metadata, unpacked and package latest) contain America/Nuuk instead (which has replaced Godthab).

I have seen that the entry point (index.js) loads the metadata files, but since the package.json tells bundlers to use builds/moment-timezone-with-data.js as the package's entry point, my Angular app contains the deprecated timezone hardcoded in the .js bundle.

Seems like a new version is needed with rebuilt bundles to fix the issue.

Etchelon avatar Jan 11 '21 16:01 Etchelon

This is most likely caused by an issue where the data compilation process loses information about which zones are links: #835

gilmoreorless avatar Jan 18 '21 12:01 gilmoreorless

@Etchelon if you really want a slick data package without extra baggage package one yourself. The source data is pretty well documented, and the moment-timezone pipeline is not terrible either.

One thing to note is that we could actually link zones that are the same, instead of copy-pasting their DST points, but nobody has proposed that so far. If somebody implemented it and made a PR it could get merged.

ichernev avatar Aug 25 '22 15:08 ichernev