albertyw/albertyw.com

View on GitHub
app/notes/20191102-0434.md

Summary

Maintainability
Test Coverage
Node Timezones

node-timezones

1572669282

Today I debugged some issues with javascript's time zone support.  Unlike most
other parts of the Node.js standard libraries, time zone converstion data
changes from time to time based on different countries' whims.  Usually, these
changes are for [minor countries](https://www.bbc.com/news/world-asia-44010705)
or are [minor changes to time zone boundaries](https://en.wikipedia.org/wiki/South_Sudan),
but recently, Brazil decided to end daylight savings with six months notice.

Looking at node specifically, it looks like nodejs's `Intl` library [depends on
ICU](https://github.com/nodejs/help/issues/1843), which [depends on
tzdata](http://userguide.icu-project.org/datetime/timezone).  However, even the
most current stable version of node as of this writing (v13.0.1) uses ICU
version 64.2, which depends on tzdata 2019a which is outdated.  On November 3,
no stable release of Node will correctly calculate Brazil's time zone.