Home > Mobile >  How Nodatime handles the changes in the IANA timezone?
How Nodatime handles the changes in the IANA timezone?

Time:10-08

I have started using NodaTime. If there are any changes in the IANA time zone or for example they add a new time zone. Then will we need to upgrade the nodatime library or will it handle it?

CodePudding user response:

Noda Time won't change its default time zone database automatically. (That would be really disruptive, would require a network connection etc.)

However:

  • Shortly after a new version is announced to the IANA database, a new NuGet package is released for each minor version we're currently still updating. In most cases this is sufficient - an app which updates the dependency reasonably frequently is likely to "see" the new data far more quickly than apps using operating system default time zone information.
  • A new nzd file is made available on nodatime.org
  • The link in https://nodatime.org/tzdb/latest.txt is updated

The latter two bullets allow your application to dynamically download the latest database and use it as an input for TzdbDateTimeZoneSource. See the documentation for sample source code (assuming you've already downloaded the database).

  • Related