Alternative to QDateTime::isDateOnly ?

David Jarvie djarvie at kde.org
Wed Apr 29 13:12:09 BST 2015


On Tue, April 28, 2015 9:32 pm, Christian Mollekopf wrote:
> On Tue, Apr 28, 2015, at 08:47 PM, John Layt wrote:
>> On 27 April 2015 at 21:17, Christian Mollekopf <chrigi_1 at fastmail.fm>
>> wrote:
>>
>

>> Using a QDate in the api is probably not an option for PIM though as
>> it doesn't have a QTimeZone attached which you will certainly always
>> need (and yes, that is a reason for doing it in QDateTime).
>>
>
> We don't need a timezone for date-only (AFAIR), but we do need date-time
> sometimes.

There *is* a valid reason for having a time zone for date-only values - it
is then possible to determine whether a date-time value falls within that
date-only value. For example, 2015-02-27T00:30 in an Australian time zone
is during 2015-02-26 for a European time zone; it is earlier than
2015-02-27 in a European time zone.

-- 
David Jarvie.
KDE developer.
KAlarm author - http://www.astrojar.org.uk/kalarm





More information about the kde-core-devel mailing list