Unsolved IMX6: Timezone invalid but available
-
Hello,
I am using QTimezone for choosing timzone from a combobox.
The Combobox holds all items from QTimeZone:: availableTimeZoneIds();Now when i choos eg. Europe/Vienna
QString zoneName = "Europe/Vienna "; QTimeZone zone(zoneName.toUtf8()); qDebug()<<zone.isTimeZoneIdAvailable("Europe/Vienna "); //returns true qDebug()<<zone.isValid(); //returns false qDebug()<<zone.standardTimeOffset(QDateTime::currentDateTime()); //returns 0
Is there anny mistake in using QTimeZone?
Why is the Timezone available but invalid?
With Timzone eg. "America/New_York" everything is ok.thanks
-
@acdc_1 said in IMX6: Timezone invalid but available:
"Europe/Vienna "
You have a space after Europe/Vienna, remove it and try again.
-
@jsulm thanks for your reply - this doesn't solve the problem.
-
@acdc_1 Maybe you should try toLatin1() instead of toUtf8()? I'm not sure whether QTimeZone expects to get ASCII or Unicode.