diff options
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 5 | ||||
-rw-r--r-- | calendar/cal-util/timeutil.c | 34 | ||||
-rw-r--r-- | calendar/cal-util/timeutil.h | 1 |
3 files changed, 5 insertions, 35 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 57dbace88f..e1af0879af 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,8 @@ +2000-12-15 Federico Mena Quintero <federico@helixcode.com> + + * cal-util/timeutil.[ch] (time_from_isodate): Removed unused + function, a relic from Gnomecal. + 2000-12-15 Dan Winship <danw@helixcode.com> * cal-util/timeutil.c (time_from_isodate): Fix the sign in the diff --git a/calendar/cal-util/timeutil.c b/calendar/cal-util/timeutil.c index a2e1d7a38d..933230872b 100644 --- a/calendar/cal-util/timeutil.c +++ b/calendar/cal-util/timeutil.c @@ -12,40 +12,6 @@ -#define digit_at(x,y) (x [y] - '0') - -time_t -time_from_isodate (char *str) -{ - struct tm my_tm; - time_t t; - - if (strlen (str) < 14) - return -1; - - my_tm.tm_year = (digit_at (str, 0) * 1000 + digit_at (str, 1) * 100 + - digit_at (str, 2) * 10 + digit_at (str, 3)) - 1900; - - my_tm.tm_mon = digit_at (str, 4) * 10 + digit_at (str, 5) - 1; - my_tm.tm_mday = digit_at (str, 6) * 10 + digit_at (str, 7); - my_tm.tm_hour = digit_at (str, 9) * 10 + digit_at (str, 10); - my_tm.tm_min = digit_at (str, 11) * 10 + digit_at (str, 12); - my_tm.tm_sec = digit_at (str, 13) * 10 + digit_at (str, 14); - my_tm.tm_isdst = -1; - - t = mktime (&my_tm); - - if (str [15] == 'Z') -#if defined(HAVE_TM_GMTOFF) - t += my_tm.tm_gmtoff -#elif defined(HAVE_TIMEZONE) - t -= timezone -#endif - ; - - return t; -} - void print_time_t (time_t t) { diff --git a/calendar/cal-util/timeutil.h b/calendar/cal-util/timeutil.h index 11bfcceb05..6eaaf63cfb 100644 --- a/calendar/cal-util/timeutil.h +++ b/calendar/cal-util/timeutil.h @@ -14,7 +14,6 @@ #include <ical.h> -time_t time_from_isodate (char *str); time_t time_from_start_duration (time_t start, char *duration); char *isodate_from_time_t (time_t t); int get_time_t_hour (time_t t); |