What time zone do I initialize QDateTime in?

  • I need my Qt application to run a task on all international computers at the same instant regardless of time zone. The application downloads the required date + time from the web in UTC. What time zone must I initialize QDateTime with? UTC? Or does it depend on the local time zone?

    For example:

    Say the required date + time is: 4/22/2013 at 14:00 UTC

    How would I initialize this for a computer that is configured with EST and another computer that is configured with PST?

    Would doing:

    @QDateTime test(QDate(2013, 22, 4), QTime(14, 0, 0));@

    mean that all international computers will run the task at the same time?

    Answered here: http://stackoverflow.com/questions/16138068/what-time-zone-do-i-initialize-qdatetime-in

Log in to reply