<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Although QDateTime has a full set of methods for working with date and times in Qt, It could lead to misunderstanding. How? Well when you are saving a date or time in this class you do not know the time is local time, UTC time or it is for a specific timezone. Therefore, maintaining the application becomes harder. Let's consider this scenario:</div><div><br></div><div>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. </div><div><br></div><div>Qt has an awesome set of classes but unfortunately when it comes to timing. the classes are really awkward. For instance, there is not a class for holding a time-span:</div><div><br></div><div><a href="https://forum.qt.io/topic/3160/qtimespan-interest">https://forum.qt.io/topic/3160/qtimespan-interest</a></div><div><br></div><div>As far as I concern, It would be a good idea that Qt has the following class:</div><div>1. QTimeSpan -> for holding duration of time.</div><div>2. QInstant -> For holding an instant of time in UTC time (like Java)<br></div><div>3. QLocalDateTime -> For holding local datetime</div><div>4. QUTCDateTime -> For holding UTC datetime</div><div>5. QZonedDateTime -> For date and times which is in a specific timezone.</div><div><br></div></div></div></div>