Possible issue with WLocalDateTime
Added by Edwin Bentley over 10 years ago
We are using WLocalDateTime when displaying any date time to the user, such as when they are picking a date and time, and then saving as a WDateTime in the database.
The issue we're finding is that WLocalDateTime::toUTC() - has no effect (our timezone is utc+1 / BST)
wcout << "UTC TIME IS: " << WLocalDateTime(cal->gCurrentDate, WTime(gHourSpinBox->value(), gMinuteSpinBox->value())).toUTC().toString() << endl;
wcout << "LOCAL TIME IS: " << WLocalDateTime(cal->gCurrentDate, WTime(gHourSpinBox->value(), gMinuteSpinBox->value())).toString() << endl;
wcout << "UTC TIME SHOULD BE: " << WDateTime::currentDateTime().toString() << endl;
With the following output occurring
UTC TIME IS: Tue Apr 15 13:50:00 2014
LOCAL TIME IS: 2014-04-15 13:50:00
UTC TIME SHOULD BE: Tue Apr 15 12:50:00 2014
Is there something wrong with our implementation?
Replies (1)
RE: Possible issue with WLocalDateTime - Added by Eivind Midtgård over 10 years ago
It looks like the same situation as in case #2829.
Regards,
Eivind