aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/itip-formatter
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchenthill@novell.com>2005-04-08 18:20:02 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-04-08 18:20:02 +0800
commit8d4a49fe281a22136757b160ba5edce68c3bd2cd (patch)
tree6a67cde263c08dd60d16c254e126650edbded4fb /plugins/itip-formatter
parent32f26826d114c10f14f76c0b7cfda4d0edbcab92 (diff)
downloadgsoc2013-evolution-8d4a49fe281a22136757b160ba5edce68c3bd2cd.tar.gz
gsoc2013-evolution-8d4a49fe281a22136757b160ba5edce68c3bd2cd.tar.zst
gsoc2013-evolution-8d4a49fe281a22136757b160ba5edce68c3bd2cd.zip
Fixes #74265 In time_days_in_month the months are indexed from 0, so
2005-04-08 Chenthill Palanisamy <pchenthill@novell.com> Fixes #74265 * itip-view.c (format_date_and_time_x): In time_days_in_month the months are indexed from 0, so subtract one from the month argument and send it. svn path=/trunk/; revision=29189
Diffstat (limited to 'plugins/itip-formatter')
-rw-r--r--plugins/itip-formatter/ChangeLog7
-rw-r--r--plugins/itip-formatter/itip-view.c6
2 files changed, 10 insertions, 3 deletions
diff --git a/plugins/itip-formatter/ChangeLog b/plugins/itip-formatter/ChangeLog
index cc349e78c0..35de67ff8d 100644
--- a/plugins/itip-formatter/ChangeLog
+++ b/plugins/itip-formatter/ChangeLog
@@ -1,3 +1,10 @@
+2005-04-08 Chenthill Palanisamy <pchenthill@novell.com>
+
+ Fixes #74265
+ * itip-view.c (format_date_and_time_x): In time_days_in_month
+ the months are indexed from 0, so subtract one from the month
+ argument and send it.
+
2005-04-07 JP Rosevear <jpr@novell.com>
Fixes #74291
diff --git a/plugins/itip-formatter/itip-view.c b/plugins/itip-formatter/itip-view.c
index 2553987f35..08256f1f3e 100644
--- a/plugins/itip-formatter/itip-view.c
+++ b/plugins/itip-formatter/itip-view.c
@@ -139,7 +139,7 @@ format_date_and_time_x (struct tm *date_tm,
/* Calculate a normalized "tomorrow" */
tomorrow_tm = *current_tm;
- if (tomorrow_tm.tm_mday == time_days_in_month (date_tm->tm_year + 1900, date_tm->tm_mon)) {
+ if (tomorrow_tm.tm_mday == time_days_in_month (date_tm->tm_year + 1900, date_tm->tm_mon - 1)) {
tomorrow_tm.tm_mday = 1;
if (tomorrow_tm.tm_mon == 11) {
tomorrow_tm.tm_mon = 1;
@@ -153,8 +153,8 @@ format_date_and_time_x (struct tm *date_tm,
/* Calculate a normalized "next seven days" */
week_tm = *current_tm;
- if (week_tm.tm_mday + 6 > time_days_in_month (date_tm->tm_year + 1900, date_tm->tm_mon)) {
- week_tm.tm_mday = (week_tm.tm_mday + 6) % time_days_in_month (date_tm->tm_year + 1900, date_tm->tm_mon);
+ if (week_tm.tm_mday + 6 > time_days_in_month (date_tm->tm_year + 1900, date_tm->tm_mon - 1)) {
+ week_tm.tm_mday = (week_tm.tm_mday + 6) % time_days_in_month (date_tm->tm_year + 1900, date_tm->tm_mon - 1);
if (week_tm.tm_mon == 11) {
week_tm.tm_mon = 1;
week_tm.tm_year++;