Re: [Evolution-hackers] Is it possible to get the system's timezone setting string?
- From: Dan Winship <danw ximian com>
- To: Harry Lu <harry lu sun com>
- Cc: evolution-hackers ximian com
- Subject: Re: [Evolution-hackers] Is it possible to get the system's timezone setting string?
- Date: Wed, 05 Nov 2003 09:39:30 -0500
On Wed, 2003-11-05 at 04:03, Harry Lu wrote:
> Hi,
> Is there a C function to get the system's timezone setting string,
> such as (Asia/Shanghai, America/New_York)?
No. You can generally get the traditional timezone name (eg, EST for
America/New_York), but those aren't unique (there are 20 zones that use
EST as an abbreviation).
On some systems, the TZ environment variable will be set to an
Olson-style timezone name. Also, on some systems, /etc/localtime will be
a symlink to a path ending with an Olson-style timezone name (eg,
/usr/share/zoneinfo/America/Indiana/Indianapolis). But on my system
(SuSE 8.2), neither of those is true. ($TZ is unset and /etc/localtime
is a hard link.) But it would at least help in some cases.
-- Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]