aboutsummaryrefslogtreecommitdiffstats
path: root/libical
diff options
context:
space:
mode:
authorDamon Chaplin <damon@ximian.com>2001-07-10 10:45:51 +0800
committerDamon Chaplin <damon@src.gnome.org>2001-07-10 10:45:51 +0800
commitc41a49b0b5b6f2b7c742cefe3b39916472cd6e7d (patch)
tree5efe48ec204b0f0de193e40af8516087b2793d58 /libical
parent8f5df2dc9e38c1396a51595c72a97c1a8de08c9a (diff)
downloadgsoc2013-evolution-c41a49b0b5b6f2b7c742cefe3b39916472cd6e7d.tar
gsoc2013-evolution-c41a49b0b5b6f2b7c742cefe3b39916472cd6e7d.tar.gz
gsoc2013-evolution-c41a49b0b5b6f2b7c742cefe3b39916472cd6e7d.tar.bz2
gsoc2013-evolution-c41a49b0b5b6f2b7c742cefe3b39916472cd6e7d.tar.lz
gsoc2013-evolution-c41a49b0b5b6f2b7c742cefe3b39916472cd6e7d.tar.xz
gsoc2013-evolution-c41a49b0b5b6f2b7c742cefe3b39916472cd6e7d.tar.zst
gsoc2013-evolution-c41a49b0b5b6f2b7c742cefe3b39916472cd6e7d.zip
forgot to compile before committing. Idiot.
2001-07-09 Damon Chaplin <damon@ximian.com> * src/libical/icaltime.c (icaltime_adjust): forgot to compile before committing. Idiot. svn path=/trunk/; revision=10945
Diffstat (limited to 'libical')
-rw-r--r--libical/ChangeLog5
-rw-r--r--libical/src/libical/icaltime.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/libical/ChangeLog b/libical/ChangeLog
index bae7663efa..e24a36208f 100644
--- a/libical/ChangeLog
+++ b/libical/ChangeLog
@@ -1,5 +1,10 @@
2001-07-09 Damon Chaplin <damon@ximian.com>
+ * src/libical/icaltime.c (icaltime_adjust): forgot to compile before
+ committing. Idiot.
+
+2001-07-09 Damon Chaplin <damon@ximian.com>
+
* src/libical/icaltimezone.c (icaltimezone_convert_time): if the 2
zones are the same just return.
diff --git a/libical/src/libical/icaltime.c b/libical/src/libical/icaltime.c
index e3229c6925..6c720b7941 100644
--- a/libical/src/libical/icaltime.c
+++ b/libical/src/libical/icaltime.c
@@ -587,7 +587,7 @@ icaltime_adjust (struct icaltimetype *tt,
int seconds)
{
int second, minute, hour, day;
- int minutes_overflow, hours_overflow, days_overflow;
+ int minutes_overflow, hours_overflow, days_overflow, years_overflow;
int days_in_month;
/* Add on the seconds. */
@@ -621,12 +621,12 @@ icaltime_adjust (struct icaltimetype *tt,
need to know what month it is to get the number of days in it.
Note that months are 1 to 12, so we have to be a bit careful. */
if (tt->month >= 13) {
- years_overflow = (month - 1) / 12;
+ years_overflow = (tt->month - 1) / 12;
tt->year += years_overflow;
tt->month -= years_overflow * 12;
} else if (tt->month <= 0) {
/* 0 to -11 is -1 year out, -12 to -23 is -2 years. */
- years_overflow = (month / 12) - 1;
+ years_overflow = (tt->month / 12) - 1;
tt->year += years_overflow;
tt->month -= years_overflow * 12;
}