KDateTime::currentUtcDateTime()
Peter Kümmel
syntheticpp at gmx.net
Tue Aug 1 16:09:42 BST 2006
David Jarvie wrote:
> On Monday 31 July 2006 10:03, Peter Kümmel wrote:
>> David Jarvie wrote:
>>> It calls KDateTime::setTime_t(), not QDateTime::setTime_t(). There is no reason to
> duplicate the code in KDateTime::setTime_t() here.
>> As I can see it the unix code doesn't set the date in currentUtcDateTime,
>> also not when calling KDateTime::setTime_t(), so why should the windows
>> code set the date?
>
> The Unix code _DOES_ set the date. Please look at the source code for KDateTime::setTime_t
> (), and you will see that it does.
>
>> Maybe I was not very clear, so I try again:
>> When the unix code in KDateTime KDateTime::currentUtcDateTime()
>> does NOT set the date of the returned KDateTime, then we could
>> remove the windows code.
>
> This is most emphatically based on a false premise. The whole point of currentUtcDateTime()
> is to set both the date _AND_ time.
>
> --
> David Jarvie.
>
>
Sorry David, it wasn't clear to me that both versions are correct on Windows
and that setTime_t also sets the date which is given in seconds since 1970.
Peter
More information about the kde-core-devel
mailing list