[Development] Adding more Datetime classes to Qt

Thiago Macieira thiago.macieira at intel.com
Tue Apr 9 16:05:38 CEST 2019

On Tuesday, 9 April 2019 05:11:03 PDT Pouya Shahinfar wrote:
> You open a project which is developed by someone else, and he/she used
> QDateTime for holding time and date. The problem here is you as a newcomer
> to project do not know the value in the class is based on UTC or local
> time, etc. if there was a class like QLocalDateTime, the code was more
> maintainable.

Why is the code unmaintainable or unreadable just because the information is 
not in the class name? The information *is* there, held inside the object. You 
can ask it (timeSpec(), offsetFromUtc() and timeZone()) what it is.

So what is the problem?

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products

More information about the Development mailing list