Results 1 to 2 of 2

Thread: about QDateTime & timezone

  1. #1
    Join Date
    Mar 2011
    Posts
    20
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default about QDateTime & timezone

    hi guys,
    i got some problem about time ,
    i'm using qt 4.7 , i've create a QDateTime dt
    and a timer (timeout 60 sec) ,
    now i changed the system time zone by outside program ,
    and it works ( after set, i got the correct time to correspond time zone ) ,
    but when the timer timeout , qt still got the old time ,
    ( the time zone "t" not changed )
    qt not update the time zone immediately , if i close and open it again
    qt got the correct time zone .
    any function or some way to update time zone immediately ?

    below is part of my code :
    Qt Code:
    1. // In timeout slot , run per minite
    2. dt = dt.currentDateTime();
    3. QLocale loc ;
    4. QString s = loc.toString(dt,"t yyyy-MM-dd hh:mm") ;
    5. qDebug() << s ;
    To copy to clipboard, switch view to plain text mode 

    this problem happened under embedded system , but run well under ubuntu10.04

    any advice will be appreciated !! thanks

  2. #2
    Join Date
    Nov 2010
    Posts
    315
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: about QDateTime & timezone

    IMO you should report a bug.

Similar Threads

  1. Timezone offset
    By pdoria in forum Qt Programming
    Replies: 5
    Last Post: 7th February 2014, 05:54
  2. Milliseconds from QDateTime
    By scamE in forum Qt Programming
    Replies: 3
    Last Post: 12th September 2010, 19:46
  3. QDateTime and comparsion
    By Talei in forum Newbie
    Replies: 0
    Last Post: 17th May 2010, 16:19
  4. QDateTime without Day
    By raphaelf in forum Qt Programming
    Replies: 4
    Last Post: 16th February 2006, 11:42
  5. 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.