On Wednesday 06 July 2011 19:52:50 Thiago Macieira wrote: > Em Wednesday, 6 de July de 2011, às 18:54:37, David Jarvie escreveu: > > On Wednesday 06 July 2011 18:26:16 Sean Harmer wrote: > > > Hi, > > > > > > On 29/06/2011 20:54, John Layt wrote: > > > > Duration: A number of Qt community members have a merge request for > > > > this > > > > already, but I feel it needs some clean-up. It would be great if an > > > > experienced KDE eye could look at this as it is likely to end up in Qt5. > > > > > > Lars Knoll has now given some more feedback on this MR which we are now > > > trying to address. Hopefully it will be up to scratch for inclusion > > > shortly. > > Can you provide a URL for this? Duration should allow for daylight savings > > time changes when it is specified in terms of days. Even if the Qt class > > doesn't do this itself, it needs to make the appropriate methods virtual to > > allow us to override them. > > There will be no virtuals in date-time or timespan classes. You don't need to > override anything. It's not like you will ever need to extend the concept of > date, time or timespan: dates are the same for all applications. > > Duration is simply the number of seconds or milliseconds between two dates, > appropriately given in their universal time. So duration is not affected by > daylight savings.
Duration must record whether it was specified in terms of hours/minutes/seconds, or days/weeks/whatever so that daylight savings changes can be taken into account when calculating the end time of a duration, given a start time. If the duration class provides methods to calculate the end time, given a start time, then it must take account of daylight savings changes. See kdepimlibs/kcalcore/duration.h for example. -- David Jarvie. KDE developer. KAlarm author -- http://www.astrojar.org.uk/kalarm
signature.asc
Description: This is a digitally signed message part.