[Gambas-user] User timezone - could I ask a favour?

Bruce Bruen bbruen at ...2308...
Wed Oct 26 09:53:35 CEST 2011


On Tue, 2011-10-25 at 21:51 +0300, Jussi Lahtinen wrote: 

> Next time please make it ready to run project!
> 
> I'm not sure this is correct: "Europe/Mariehamn".
> I don't live in Mariehamn, but there is only one timezone in Finland!
> Confusion... but then it should be Helsinki which is our capital..!?
> Gnome shows my location as Vantaa which is correct.
> 
> Ubuntu 11.04 64bit also with gnome 2.
> 
> Jussi


Thanks Jussi,

Hmmm.  Well that just about squashes that good idea.  My code just took
the first md5 matched file in /usr/share/zoneinfo, so in your case
Europe/Helsinki just happened to be the second one found.  Why Aaland
Islands (or Åland Islands) get their own zoneinfo file is unknown,
especially when I look at the zoneinfo database and see that the rule
for the data is just "Link Europe/Helsinki".  

I've now taken another look at the zoneinfo files and there are a lot of
cases where the md5sums are equivalent.  So my current approach is
squashed and I'll have to find another generic way to get the user's
timezone.

(I sent the code as source because I didn't want anyone to fear that I
was going to compromise their time data somehow.)

Bruce 



More information about the User mailing list