[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KF5: Parsing times with timezone abbreviations
From:       Kevin Kofler <kevin.kofler () chello ! at>
Date:       2014-03-31 10:53:37
Message-ID: lhbhfo$dq7$1 () ger ! gmane ! org
[Download RAW message or body]

Thiago Macieira wrote:
> Time zone abbreviations are useless, since they are not unique. Simply
> strip them out of your string before passing to QDateTime.

Nice theory, but there is no other way to know what time this actually is. 
Unless you can offer a mapping from latitude and longitude to timezone, or a 
way to automatically figure it out from "place name, country" (which is 
especially fun for those countries that span multiple time zones, because 
the place name can be a small town somewhere).

I do see the problem, e.g. I get "EST" as the timezone for Sydney, 
Australia, which is obviously not the same as the US "EST". I suppose 
KDateTime will do the wrong thing for that. :-(

Maybe we need a (timezone abbreviation, country) → timezone map (and an API 
where I can just feed in the time including the abbreviation and the country 
name and get a correct QDateTime; heck, for most countries, the abbreviation 
could be ignored entirely, it only matters for huge countries such as the 
USA or Russia)?

        Kevin Kofler

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic