Results 1 to 2 of 2

Thread: DST and timezone

  1. #1
    Join Date
    Dec 2011
    Posts
    4
    Qt products
    PyQt3 PyQt4

    Default DST and timezone

    Hi,

    I'm currently using Qt 4.8 to program. I was wondering how can I change my TimeZone to a specific city or country so that I would be able to check if the DST is active for that city and if so what the value is for that DST. In other words, let's say I program using Pacific time, and my application has to create something with a validation date. Now the user has a choice of selecting the timezone he wants to create the validation date for from a list of cities (for example he chooses London which is GMT +00:00). How can I know if London had the DST active or not at that moment, and if it is how much is the DST for like +1 +2 and so on...

    Regards

  2. #2
    Join Date
    Dec 2009
    Posts
    65
    Thanks
    10
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: DST and timezone

    when there are time-zones involved i always use QDateTime::toUTC(), UTC doesn't use DST, you can compare original datetime with datetime.toUTC() to see the real difference in hours

Similar Threads

  1. Timezone offset
    By pdoria in forum Qt Programming
    Replies: 5
    Last Post: 7th February 2014, 05:54
  2. Replies: 0
    Last Post: 1st December 2011, 05:07
  3. about QDateTime & timezone
    By lllturtle in forum Qt Programming
    Replies: 1
    Last Post: 2nd August 2011, 11:34
  4. Replies: 6
    Last Post: 10th January 2006, 13:07

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.