From 272857c73c1d7b92551d0ce12de43733ba10d50a Mon Sep 17 00:00:00 2001 From: Mike McEwan Date: Tue, 22 Jun 1999 17:50:04 +0000 Subject: Tell ktime' that we don't know about daylight saving time so that it does 1999-06-07 Mike McEwan * timeutil.c (time_add_month): Tell ktime' that we don't know about daylight saving time so that it does *not* make adjustments when we traverse a DST boundary. (time_year_begin): ditto. (time_year_end): ditto. (time_month_begin): ditto. (time_month_end): ditto. svn path=/trunk/; revision=986 --- calendar/ChangeLog | 10 ++++++++++ calendar/timeutil.c | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 0d9afa0a6f..1b4a413eb2 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,13 @@ +1999-06-07 Mike McEwan + + * timeutil.c (time_add_month): Tell ktime' that we don't know + about daylight saving time so that it does *not* make adjustments + when we traverse a DST boundary. + (time_year_begin): ditto. + (time_year_end): ditto. + (time_month_begin): ditto. + (time_month_end): ditto. + 1999-06-16 Anders Carlsson * main.c (new_calendar): Realize the toplevel widget when diff --git a/calendar/timeutil.c b/calendar/timeutil.c index c03f2cb565..77a468471e 100644 --- a/calendar/timeutil.c +++ b/calendar/timeutil.c @@ -147,6 +147,7 @@ time_add_month (time_t time, int months) */ tm->tm_mon += months; + tm->tm_isdst = -1; if ((new_time = mktime (tm)) == -1){ g_warning ("mktime could not handling adding a month with\n"); print_time_t (time); @@ -232,6 +233,7 @@ time_year_begin (time_t t) tm.tm_sec = 0; tm.tm_mon = 0; tm.tm_mday = 1; + tm.tm_isdst = -1; return mktime (&tm); } @@ -248,6 +250,7 @@ time_year_end (time_t t) tm.tm_mon = 0; tm.tm_mday = 1; tm.tm_year++; + tm.tm_isdst = -1; return mktime (&tm); } @@ -262,6 +265,7 @@ time_month_begin (time_t t) tm.tm_min = 0; tm.tm_sec = 0; tm.tm_mday = 1; + tm.tm_isdst = -1; return mktime (&tm); } @@ -277,6 +281,7 @@ time_month_end (time_t t) tm.tm_sec = 0; tm.tm_mday = 1; tm.tm_mon++; + tm.tm_isdst = -1; return mktime (&tm); } -- cgit