Bedework timezones
With 3.5 timezones have changed significantly.
Prior to this we maintained timezones within the bedework database. In addition we retained user owned timezones as well as a set of standard timezones.
With 3.5 we eliminated user timezones completely. Too much complication and too many problems arose from preserving timezone inormation we received.
For example, many systems use a truncated timezone specification which only handles the timezone rules in force at the time. Future times will probably be incorrect with these specifications.
In addition, when timezones change, these private copies do not get updated.
With 3.5 we introduce a timezone server which delivers timezone information and a set of aliases. This service can be updated by replacing a zip file at a known location.
Building the timezones zip file
This involves creating the timezone information from the latest Olson data - adding the alias file and zipping it all up.
- Decide on a place for the latest copy of the timezone information. For example in the quickstart we have data/timezones/current
- Set this path in the configuration properties for the timezone server
org.bedework.app.tzsvr.zoneinfo= ${org.bedework.project.bedework}/../data/timezones/current/zoneinfo - Download the latest timezone data. Instructions (out of date) are at http://www.twinsun.com/tz/tz-link.htm. Place them in some other location.
- Data at ftp://elsie.nci.nih.gov/pub/
- vzic can be downloaded from http://sourceforge.net/project/showfiles.php?group_id=173654
- Expand vzic
- Expand the tzdata - should give you a folder with a name like tzdata2008i
- cd into the vzic directory, edit the makefile and set the variables
- OLSON_DIR: where you expanded the data
- PRODUCT_ID: e.g "-//Bedework.org//NONSGML Bedework//EN"
- TZID_PREFIX set to null.
- 'make' (I had to install libglib-2.0-dev to get it to compile)
- vzic [--pure] (omit the pure for allegedly better outlook compatability - but not altogether correct timezones)
- Copy the newly created zoneinfo directory into your current zoneinfo place defined above.
- Copy the alias file into the same place
cp ~/quickstart/bedework/projects/bwtzsvr/resources/aliases.txt ~/quickstart/data/timezones/current/
- cd into the directory containing zoneinfo and th ealias file and zip the contents as tzdata.zip
cd ~/quickstart/data/timezones/current/ zip -r tzdata *
- Copy the resulting file to the location specified by the url in your tzserver config, by default in the webapps/ROOT directory of tomcat in the quickstart
- Rebuild or restart your timezones server
- Start tomcat and browse to your timezone server with the request parameter aliases, e.g. http://localhost:8080/tzsvr?aliases
Timezones server requests
The timezones server is a simple server which provides the following:
- A list of timezone names - request parameter "names"
- A timezone in VTIMEZONE format - request paramaeter "tzid=name"
- A set of aliases in proeprty file format - request parameter "aliases"
- Some statistics - request parameter "stats"
- Date/time conversion - e.g.
http://localhost:8080/tzsvr/?convert=&dt=20090211T131800&fromtzid=America/New_York&totzid=Europe/London
It is presumed that usage will be very low. Both bedework and the timezones server cache timezone information. Bedework shoul donly call the timezones server once each for the list of aliases and timezone names and once per timezone. This should be reflected in the timezone stats which should show almost no activity.
