Time Label

Apr 16, 2008 at 3:57 AM
I am starting a discussion about showing/getting the time label for the current time, eg. AEST/AEDST, to allow displaying to the user exactly what time they are looking at.

Is this possible with the Olson database, I haven't been able to find this information in the data files.

Lee
Coordinator
Apr 22, 2008 at 11:52 PM
Hi Lee,

Sorry in the delay in responding to this ... just saw it.


leethal wrote:
I am starting a discussion about showing/getting the time label for the current time, eg. AEST/AEDST, to allow displaying to the user exactly what time they are looking at.

Is this possible with the Olson database, I haven't been able to find this information in the data files.


Unfortunately it looks like this information is incomplete / incorrect in the Olson database files.

The format of the files allow for this information but it looks like it is just not present in there.
The API as such doesn't support getting this out either but it wouldn't be too much work to support this if it were there.

So it looks like if we want the information there we will need to contact the maintainers of the data source itself.

Based on the homepage of the database (http://www.twinsun.com/tz/tz-link.htm) it looks like we need to send that sort of thing to the timezone mailing list (tz@elsie.nci.nih.gov).

I haven't had the time to fight this fight yet but if I know that others need it as well it may just give me the push I need :)

Thanks for starting this thread. I will let you know if I make any progress; please let me know if you do.

Mark
Coordinator
Apr 23, 2008 at 12:41 AM
OK, I have now joined the group.

Also found an article with some official information on this (http://www.australia.gov.au/Time_Zones) so I will forward this to the group and see how we go.

Mark
Apr 30, 2008 at 12:42 AM
Currently I have used a workaround of creating another file with the date shorthand in it, which I read into the class and store the same way you store the rules. This works for me because I only need this for Australian dates at the moment.

I am interested to hear if this is picked up by the Olsen group.
Coordinator
May 1, 2008 at 6:10 AM
Hi Lee,

I have done a couple of things:

1. I have sent an email to the tz mailing list with the suggestion to update the time zone format strings for Australia. Let's see how that goes...

2. I have added a new method called Zone.GetFormat(DateTime).
This will return the format string for the given zone and datetime based on the data from data files.

Now rather than reading from another source you can update your local australasia file with something like this (which I applied to Melbourne):

# Victoria
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule AV 1971 1985 - Oct lastSun 2:00s 1:00 S
Rule AV 1972 only - Feb lastSun 2:00s 0 S
Rule AV 1973 1985 - Mar Sun>=1 2:00s 0 S
Rule AV 1986 1990 - Mar Sun>=15 2:00s 0 S
Rule AV 1986 1987 - Oct Sun>=15 2:00s 1:00 D
Rule AV 1988 1999 - Oct lastSun 2:00s 1:00 D
Rule AV 1991 1994 - Mar Sun>=1 2:00s 0 S
Rule AV 1995 2005 - Mar lastSun 2:00s 0 S
Rule AV 2000 only - Aug lastSun 2:00s 1:00 D
Rule AV 2001 2007 - Oct lastSun 2:00s 1:00 D
Rule AV 2006 only - Apr Sun>=1 2:00s 0 S
Rule AV 2007 only - Mar lastSun 2:00s 0 S
Rule AV 2008 max - Apr Sun>=1 2:00s 0 S
Rule AV 2008 max - Oct Sun>=1 2:00s 1:00 D
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Australia/Melbourne 9:39:52 - LMT 1895 Feb
10:00 Aus EST 1971
10:00 AV AE%sT


Hopefully these changes will become permanent and you won't need to maintain this seperate source anymore.

Let me know how that goes.

Thanks again for the feedback.

Mark