timtonk / TZ-formater

Ruby gem for timezone format converting
MIT License
2 stars 1 forks source link

POSIX is wrong for Eastern Australia #6

Open thejuan opened 10 years ago

thejuan commented 10 years ago

Are you building the POSIX strings or have you grabbed the string from somewhere?

Eastern Australia except QLD, should be AEDT in summer

timtonk commented 10 years ago

Wow, someone uses it, except for me! All posix strings are hardcoded in .pstore file, because I think it's the most optimal and fastest way to work with it. The problem is a fact that it's impossible to create POSIX string from any other kind of timezone strings. @thejuan could you point out where I can obtain the newest POSIX shortages? And I'll update pstore file shortly.

thejuan commented 10 years ago

I am looking for a good source of POSIX strings for OpenWrt... All over the web, the same list seems to be used, and its wrong. I don't have a source for you, i just live in australia and know the australian ones are wrong

timtonk commented 10 years ago

I know that it's possible to construct POSIX tz from the tzdata and I believe you got it too - there are tons of documents about coding into POSIXtz. But in fact it's the last thing I want to do by bare hands. I wonder if there is any tool for such transconding on the fly?

timtonk commented 9 years ago

Hey @thejuan, don't know if it still an issue for you, but I finally has found the source of POSIX strings. In fact it was on my dev machine, I just wasn't attentive enough. The dir /usr/share/zoneinfo/posix contains files for each timezone which can be used to extract POSIX shortage. For example:

[vagrant@localhost tmp]$ strings /usr/share/zoneinfo/posix/Australia/Melbourne
TZif2
AEDT
AEST
TZif2
        LMT
AEDT
AEST
AEST-10AEDT,M10.1.0,M4.1.0/3
[vagrant@localhost tmp]$ strings /usr/share/zoneinfo/posix/Australia/Perth
TZif2
g G#|
AWDT
AWST
TZif2
        LMT
AWDT
AWST
AWST-8

Hope it will be helpful for you. I will update all timezones in my gem afterwards.