Updating the zoneinfo

From Jsorm

Jump to: navigation, search

The zoneinfo files are updated several times per year by the public-domain Elsie zoneinfo project. The updated versions are released as source code which is human- and machine-readable, but highly inefficient for real-time processing, especially in a time- and bandwith- and latency-sensitive Web application. As such, almost all users of the zoneinfo database compile them, either in the native machine format provided by the project, or in a special format. For example, Java uses a specially compiled version for its TimeZone class.

jsorm i18n uses its own version, specially compiled into JSON and parsed by theTimeZone class.

The zoneinfo releases updates several times per year. Each release has a version number, comprised of the year of release, e.g. 2007, and the version within that year, signified by a lower-case sequential letter of the English alphabet. Thus, the first release in 2005 was 2005a, while the last release in 2007 was 2007k (which followed 2007j, before that 2007i, etc.).

Because zoneinfo updates can occur on a different schedule than jsorm i18n updates, it is possible (and desirable) to be able to download and install zoneinfo updates separately from i18n updates.

Contents

Installing a New Version

Check Your Current Version

Before downloading a new version of zoneinfo, first check if your version is up-to-date. This can be done in one of three ways.

  • The zoneinfo file you downloaded, if separate from the i18n package, is named jsorm-i18n-zoneinfo-version.zip. Compare the version to the latest one available.
  • Check the file named +VERSION in your zoneinfo install directoy. It is a short text file, whose contents are the name of the version.
  • From within a JavaScript page, run TimeZone.getVersion(). The results in the callback will tell you the version number.

Downloading

Go to the jsorm downloads page. Get the latest version of zoneinfo, which is named jsorm-i18n-zoneinfo-version.zip.

Installation

Unzip the download file. Install into a directory accessible to your application.

Be very careful not to override the existing installation, as some files may be changed or out of date. It is better to install into another directory, then move/rename the directories as necessary when ready.