aboutsummaryrefslogtreecommitdiffstats
path: root/libical/src
diff options
context:
space:
mode:
Diffstat (limited to 'libical/src')
-rw-r--r--libical/src/libical/icallexer.l8
-rw-r--r--libical/src/libical/icaltime.c11
2 files changed, 11 insertions, 8 deletions
diff --git a/libical/src/libical/icallexer.l b/libical/src/libical/icallexer.l
index 4ac847b064..5a3616b8da 100644
--- a/libical/src/libical/icallexer.l
+++ b/libical/src/libical/icallexer.l
@@ -6,7 +6,7 @@
DESCRIPTION:
- $Id: icallexer.l,v 1.6 2000/12/12 00:27:39 federico Exp $
+ $Id: icallexer.l,v 1.7 2000/12/12 22:54:40 danw Exp $
$Locker: $
(C) COPYRIGHT 1999 Eric Busboom
@@ -63,12 +63,6 @@ char *str_buf;
char *str_buf_p;
size_t buf_sz; /* = ICAL_MAX_STR_CONST;*/
-/* Define routines that were not propertly defined because of the
-renaming hack applied in icalyacc.y */
-YY_BUFFER_STATE ical_yy_scan_buffer ( char *base, yy_size_t size );
-YY_BUFFER_STATE ical_yy_scan_string ( yyconst char *yy_str );
-YY_BUFFER_STATE ical_yy_scan_bytes ( yyconst char *bytes, int len );
-
%}
crlf \x0D?\x0A
diff --git a/libical/src/libical/icaltime.c b/libical/src/libical/icaltime.c
index f43602a721..3a762a73f9 100644
--- a/libical/src/libical/icaltime.c
+++ b/libical/src/libical/icaltime.c
@@ -284,7 +284,9 @@ struct icaltimetype icaltime_as_zone(struct icaltimetype tt,const char* tzid)
indicating the date for which you want the offset */
time_t icaltime_utc_offset(struct icaltimetype tt, const char* tzid)
{
+#ifdef HAVE_TIMEZONE
extern long int timezone;
+#endif
time_t now;
struct tm *stm;
@@ -315,7 +317,11 @@ time_t icaltime_utc_offset(struct icaltimetype tt, const char* tzid)
putenv("TZ"); /* Delete from environment */
}
+#ifdef HAVE_TIMEZONE
return timezone;
+#else
+ return -stm->tm_gmtoff;
+#endif
}
time_t icaltime_local_utc_offset()
@@ -325,8 +331,11 @@ time_t icaltime_local_utc_offset()
stm = localtime(&now); /* This sets 'timezone'*/
+#ifdef HAVE_TIMEZONE
return timezone;
-
+#else
+ return -stm->tm_gmtoff;
+#endif
}