[Interest] Getting the timezone from Qt?
Nikos Chantziaras
realnc at gmail.com
Sun Jul 29 22:30:32 CEST 2012
On 29/07/12 14:15, Konrad Rosenbaum wrote:
> On Saturday 28 July 2012, Nikos Chantziaras wrote:
>> But thank you very much for the pointer anyway. At least I can look at
>> that code to get an idea about how to get the needed info from the
>> system :-)
>
> src/tzsys*.cpp :-)
>
> The unix variant should work on Mac as well and pretty much on any
> Linux/Unix based system. It simply reads the "TZ" environment variable.
That variable doesn't exist here. So I'm looking for /etc/timezone and
/etc/localtime. In case the latter is a symlink, it's possible to get
the timezone from the path string.
More information about the Interest
mailing list