KDateTime::currentUtcDateTime()

David Jarvie lists at astrojar.org.uk
Mon Jul 31 10:21:22 BST 2006


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.





More information about the kde-core-devel mailing list