Hello,
On linux (platform_adapters/linux/platform_timezones.cpp),
the implementation of getSystemTimeZoneContext seems have
problems: it use tzset() and later check tzname[0], tzname[1]
to match against a built-in known timezone table (sysync/tz_table.h).
I found the tzname fields set by tzset() is incorrect or at least ambiguous
on ubuntu karmic, fedora 11.
In my case, my system timezone is Asia/Shanghai (UTC+8), but synthesis engine
will
detect is as UTC-6.
My conclusion is we cannot use tzname fields to detect the timezone, maybe we
can
try use timezone and daylight variable instead?
------------------------------
See below tests:
The samle code is as below:
tzset()
printf ("tzname[0] %s\n", tzname[0]);
printf ("tzname[1] %s\n", tzname[1]);
---
Here are the output on Ubuntu karmic:
TZ=':Asia/Shanghai' ./test
tzname 0 CST
tzname 1 CDT
TZ=':America/Chicago' ./test
tzname 0 CST
tzname 1 CDT
TZ=':Asia/Tokyo' ./test
tzname 0 JST
tzname 1 JDT
Best Regards,
Congwu
_______________________________________________
os-libsynthesis mailing list
[email protected]
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis