[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:       "David Jarvie" <djarvie () kde ! org>
Date:       2014-03-31 13:10:25
Message-ID: c7e703d1aaf1ea7520784ef90e6b9635.squirrel () www ! sensical ! net
[Download RAW message or body]

On Mon, March 31, 2014 11:53 am, Kevin Kofler wrote:
> 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)?

They can't just be ignored for small countries, since they may contain a
daylight savings time indication.

-- 
David Jarvie.
KDE developer.
KAlarm author - http://www.astrojar.org.uk/kalarm

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

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