Firstly, the implementation using a table of dst presets we have is working fine (still being tested but it's pretty straightforward). We just need to work on maintaining this table.
Note that this table is ONLY DST offsets ... not timezones or regional areas. It just contains the information about when to offset time and by how much. Many countries and areas in the northern hemisphere, for example, will use the same entry - even those parts with very different timezones.
We have two main types of Moodle sites when it comes to DST:
A) Those in an institution where everyone is in the same timezone/DST.
The admin chooses the institution timezone+DST from a menu (may not be the same as their web host!) and this will be used by default for all users (as "Server time" and "Server DST" in their profile).
B) Those who have users from all over the place.
- We need a default list of known DST conditions around the world.
Someone (Martin L volunteered!) could make us that list as a text file,
generated automatically by a PHP script from POSIX timezone
files. I've no idea how many would be in this list (I'm guessing less than 20?)
- We need to make a new 1.5 install import that default list during installation/update. The DST menu should have meaningful names that makes it easy to select
the right one. I was thinking something like: First Monday in
March -> Last Friday in September
- We need to allow the admin to update this list any time they
like with new information. I'm more than happy to host a master
copy on moodle.org (generated by the same script as (a)). Moodle
could either import the list from moodle.org or from a local
file. Jon has an idea for an MD5 hash in the database that will
make it simple to only update new entries and leave custom ones alone.
- We need to make it simple for users to set their own Timezone+DST in their
profile. Easiest would be one menu with many hundreds of locales
in it (much like the timezone files) and entries like Australia/Perth
but this could be very wierd to arrange from the backend (one name > two settings and vice-versa)
Currently in 1.5 there are two fields to change. I suggest modifying the old timezone menu to show just a list of times (not the timezone info) and ask users simply to "select the current time" as well as a DST preset. Depending on the DST preset, we can work out if they are in DST at the moment and adjust the actual stored timezone forward or back as required to reflect their timezone outside of DST.
- (optional) I was talking before also about allowing users to create their own DST preset entry if the system didn't have one, but this is less important if we can get a fairly comprehensive list in the database from the start.