×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Jul 2007
    Location
    Eindhoven, the Netherlands
    Posts
    187

    QDateTime behaves bad on Qt 4.7-beta1 for symbian. Seems ok on Qt 4.6.3

    Hi,

    I've found the following strange behaviour of QDateTime on Qt 4.7-beta1, to generate a GPX
    timestamp for new waypoints i use the following code:

    QDateTime curtime = QDateTime::currentDateTime().toUTC();
    QString timestamp = curtime.toString("yyyy-MM-ddThh:mm:ssZ");

    However, the resulting timestamp doesn't even come close to the current date & time...
    It gives me 1950-01-31T04:25:25 when the phone itself has a time of 09:16 and date today...
    Now i would expect some offset due to the localtime versus UTC time, but that is usually only
    an hour, or 2, depending on daylight saving time. It should not be 4 hours and 51 minutes off...
    And then the date... why does it think it is january 31st 1950?

    Am i doing something wrong here?
    (happens both in emulator and on device. on another development machine with Qt 4.6.3 running
    the same code on the emulator the behaviour is as expected)


    Regards,
    Mark.


    PS
    Elsewhere in my program, I'm using QTime to query the current time (not UTC), and when querying hours/minutes/seconds for my clock, everything is correct:

    QTime time = QTime::currentTime();
    int second = time.second();
    int minute = time.minute();
    int hour = time.hour();

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QDateTime behaves bad on Qt 4.7-beta1 for symbian. Seems ok on Qt 4.6.3


  3. #3
    Regular Contributor
    Join Date
    Jul 2007
    Location
    Eindhoven, the Netherlands
    Posts
    187

    Re: QDateTime behaves bad on Qt 4.7-beta1 for symbian. Seems ok on Qt 4.6.3

    Ok, after going through some struggles getting qt 470 beta 2 installed, it seems indeed solved in this release.

    The problem i had with installing beta2, it's qt_installer.sis doesn't want to install properly (complains about missing pips). After reinstalling the qt_installer.sis version from beta1, and then installing qt.sis from beta2, everything seems ok.

Similar Threads

  1. Qt Creator code completion not working with Qt Mobility for Symbian
    By ceefour in forum [Archived] Qt Mobility Project
    Replies: 4
    Last Post: 2011-09-10, 05:02
  2. S60_5th_Edition_SDK_v1_0 + Qt creator 2.0 + qt-symbian-opensource-4.7.0-beta1配置问题?
    By fish_of_deadsea in forum [Archived] Qt General ( Qt技术)
    Replies: 0
    Last Post: 2010-05-30, 06:11
  3. Replies: 0
    Last Post: 2009-11-18, 12:18

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×