diff options
author | Timur Bakeyev <mc@bat.ru> | 1999-02-22 08:55:21 +0800 |
---|---|---|
committer | Timur I. Bakeyev <timur@src.gnome.org> | 1999-02-22 08:55:21 +0800 |
commit | 06231f4f07c3fa20ab8e62b469eb1311e07bd3a5 (patch) | |
tree | 762eed991ae8d6eb190f6fc4d3e8871cde0b5c92 /calendar/calendar.c | |
parent | b779411ecc5714bc27ce5082ca40512851c5e876 (diff) | |
download | gsoc2013-evolution-06231f4f07c3fa20ab8e62b469eb1311e07bd3a5.tar gsoc2013-evolution-06231f4f07c3fa20ab8e62b469eb1311e07bd3a5.tar.gz gsoc2013-evolution-06231f4f07c3fa20ab8e62b469eb1311e07bd3a5.tar.bz2 gsoc2013-evolution-06231f4f07c3fa20ab8e62b469eb1311e07bd3a5.tar.lz gsoc2013-evolution-06231f4f07c3fa20ab8e62b469eb1311e07bd3a5.tar.xz gsoc2013-evolution-06231f4f07c3fa20ab8e62b469eb1311e07bd3a5.tar.zst gsoc2013-evolution-06231f4f07c3fa20ab8e62b469eb1311e07bd3a5.zip |
tzname issues
1999-02-22 Timur Bakeyev <mc@bat.ru>
* configure.in: Added check for langinfo.h and for representation of
timezone info - tzname or tm.tm_zone.
svn path=/trunk/; revision=682
Diffstat (limited to 'calendar/calendar.c')
-rw-r--r-- | calendar/calendar.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/calendar/calendar.c b/calendar/calendar.c index b451703e8a..024e2d0116 100644 --- a/calendar/calendar.c +++ b/calendar/calendar.c @@ -20,6 +20,10 @@ #include "timeutil.h" #include "../libversit/vcc.h" +#ifdef HAVE_TZNAME +extern char *tzname[2]; +#endif + /* Our day range */ time_t calendar_day_begin, calendar_day_end; @@ -325,16 +329,21 @@ calendar_save (Calendar *cal, char *fname) GList *l; time_t now = time (NULL); struct stat s; + struct tm *tm; if (fname == NULL) fname = cal->filename; /* WE call localtime for the side effect of setting tzname */ - localtime (&now); + tm = localtime (&now); vcal = newVObject (VCCalProp); addPropValue (vcal, VCProdIdProp, "-//GNOME//NONSGML GnomeCalendar//EN"); - addPropValue (vcal, VCTimeZoneProp, tzname [0]); +#if defined(HAVE_TM_ZONE) + addPropValue (vcal, VCTimeZoneProp, tm->tm_zone); +#elif defined(HAVE_TZNAME) + addPropValue (vcal, VCTimeZoneProp, tzname[0]); +#endif addPropValue (vcal, VCVersionProp, VERSION); cal->temp = vcal; |