I am currently developing an application which deals with a lot of timestamps using Qt.
I often need to display timestamps using QDateTime, QDateTimeEdit, and so on..
I always use UTC timestamps.
My problem is that I am sick (I mean, really, I do some tricky timestamp crunching and a forgotten .toUTC() is very hard to spot) of always converting to/from the local timezone since all Qt date/time widgets seems to assume the local timezone is used for inputs and outputs.
Is there any way to ask Qt to just discard the timezone of the client and assume everything is in UTC ?
For now, I set my Windows clock to use UTC so that I can debug easily…
This Qt behavior is insanely annoying.
Just an idea that I would use to ensure I do not forget: Subclass QDateTime to say QUTCDateTime and probably throw in some utility methods too.