Re: KF5: Parsing times with timezone abbreviations

2014-03-31 Thread Kevin Kofler
David Jarvie wrote: > They can't just be ignored for small countries, since they may contain a > daylight savings time indication. Except for one "evil" hour every year, a given local time with the date included is either necessarily DST or necessarily non-DST. That said, sure, if we are about t

Re: KF5: Parsing times with timezone abbreviations

2014-03-31 Thread David Jarvie
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. > Unle

Re: KF5: Parsing times with timezone abbreviations

2014-03-31 Thread Kevin Kofler
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 tim

Re: KF5: Parsing times with timezone abbreviations

2014-03-30 Thread Thiago Macieira
Em seg 24 mar 2014, às 04:33:34, Kevin Kofler escreveu: > Hi, > > what is the recommended way to parse times with short timezone > abbreviations, such as "16:00 CET", in Qt 5 / KF5 land? (I am asking because > this is the format the BBC is using for weather observation times in their > RSS files.)

Re: KF5: Parsing times with timezone abbreviations

2014-03-30 Thread Kevin Kofler
Hi, about a week ago, I wrote: > what is the recommended way to parse times with short timezone > abbreviations, such as "16:00 CET", in Qt 5 / KF5 land? (I am asking > because this is the format the BBC is using for weather observation times > in their RSS files.) One week later, I still didn't

Re: KF5: Parsing times with timezone abbreviations

2014-03-25 Thread Kevin Kofler
Luca Beltrame wrote: > Can you try looking at KFormat? The KF5 porting notes explicitly mention > that. KFormat does not do any parsing. Kevin Kofler

Re: KF5: Parsing times with timezone abbreviations

2014-03-24 Thread Luca Beltrame
Kevin Kofler wrote: > In kdelibs 4, this should do what we want: > dateTime = KDateTime::fromString(timeString, "%H:%M > %Z").toLocalZone().dateTime(); but KDateTime is deprecated in KF5. Can you try looking at KFormat? The KF5 porting notes explicitly mention that. -- Luca Beltrame - KDE For

KF5: Parsing times with timezone abbreviations

2014-03-23 Thread Kevin Kofler
Hi, what is the recommended way to parse times with short timezone abbreviations, such as "16:00 CET", in Qt 5 / KF5 land? (I am asking because this is the format the BBC is using for weather observation times in their RSS files.) In kdelibs 4, this should do what we want: dateTime = KDateTime::f