[Interest] Setting timezone for QDateTime::currentDateTime()

Tom Isaacson Tom.Isaacson at navico.com
Sat Aug 8 21:59:43 CEST 2015


I'm running Qt 4.8.2 on a Freescale BSP using Linux 3.0.17. The documentation for QDateTime::currentDateTime() says "Returns the current datetime, as reported by the system clock, in the local time zone." We use settimeofday() [http://linux.die.net/man/2/settimeofday] to set the system clock but the documentation says the timezone struct is obsolete and should not be used. So how can we programatically set the timezone in a way that Qt will recognise?

Tom Isaacson









More information about the Interest mailing list