Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    What time zone do I initialize QDateTime in?

    General and Desktop
    1
    1
    1235
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tahayassen last edited by

      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

      1 Reply Last reply Reply Quote 0
      • First post
        Last post