On Friday, January 27, 2012 13:30:35 Thiago Macieira wrote: > Correct. What do we need extending them with? The only virtuals you left in > the API were stream (which I didn't get) and utcOffset, which doesn't seem > to need to be a virtual.
Different timezones (and countries) have daylight savings time at different times of the year (or different days from year to year). Different implementations of utcOffset would take account of that. So there's a dependence on both the timezone and the datetime object. What do you propose? > > And therefore the olson db and > > windows registry timezone information code would need to be in QtCore? > > See Lorn's email. I don't know why we'd need to keep them in QtCore. Lorn's email said he used the windows and olsondb info. If not in QtCore, where would they go? > > > > I didn't get what QDataStream has to do with anything. Are you > > > asking how QDateTime should include the information about the > > > timezone it's associated > > > with? One way is to include the UTC offset in seconds or minutes > > > (minutes allows us to keep it with 16 bits). > > > > That probably wouldn't work for historical datetimes, would it? > > If you mean "before 1970", they should simply use an undeterminate timezone. I don't think it's that simple. Maybe Lorn knows. > > > But the Olsen identifier would be nice > > > too, if we have it. A custom timezone would include just the offset. > > > > What is a custom timezone? If we have the Windows timezone identifier > > should we include that too? > > I was thinking of two cases: 1) a QDateTime with an UTC offset set, instead > of a proper timezone or 2) when $TZ or /etc/localtime point to a timezone > which we can't find in the DB. If we just drop such information and use utc offset when storing it, then 'custom timezones' are useless anyway, right? > > But yes, now I think about it, adding timezone information is probably > > not source incompatible. I do still wonder about behaviour > > compatibility, but that's probably solvable too. Sorry, I meant to write 'probably source compatible'. Anyway, I think Lorn needs to give more input and maybe his patch. Thanks, -- Stephen Kelly <[email protected]> | Software Engineer KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090 KDAB - Qt Experts - Platform-Independent Software Solutions
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
