[tz] timezone DB distribution

Paul Eggert eggert at cs.ucla.edu
Thu Aug 20 17:02:14 UTC 2020


On 8/19/20 10:17 AM, Matt Johnson-Pint wrote:

> If you need to support older browsers, you can either use one of the previously mentioned libraries and also add the Intl Polyfill (https://github.com/formatjs/date-time-format-timezone), or you can use Moment-Timezone (https://momentjs.com/timezone/), which is an add-on for Moment.js (https://momentjs.com/).  With either one, your app would carry some form of the tzdata with it.

Thanks for mentioning that. Although tz-link.html already mentioned 
Moment-Timezone, the timeZone option of JavaScript's Intl.DateTimeFormat is also 
worth mentioning as it can be a string like "America/Los_Angeles". I added the 
attached proposed patch to the development sources.

It seems that pretty much every JavaScript runtime except Internet Explorer 
supports tz names in the timeZone option nowadays, though older versions of 
runtimes may lack this support. See:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#Browser_compatibility
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Mention-Intl.DateTimeFormat.patch
Type: text/x-patch
Size: 3070 bytes
Desc: not available
URL: <http://mm.icann.org/pipermail/tz/attachments/20200820/ca34ca7d/attachment.bin>


More information about the tz mailing list