[evolution-mapi] Bug #622923 - Birthday/Anniversary shifted by one day



commit 0f01f64c23ab3fa9de7001b7a0c905b599acd034
Author: Charles Bovy <charles bovy gmail com>
Date:   Mon Jun 28 13:56:35 2010 +0200

    Bug #622923 - Birthday/Anniversary shifted by one day

 src/addressbook/e-book-backend-mapi-utils.c |    2 +-
 src/addressbook/e-book-backend-mapi.c       |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-mapi-utils.c b/src/addressbook/e-book-backend-mapi-utils.c
index 8dea215..311aa08 100644
--- a/src/addressbook/e-book-backend-mapi-utils.c
+++ b/src/addressbook/e-book-backend-mapi-utils.c
@@ -383,7 +383,7 @@ mapi_book_utils_contact_from_props (ExchangeMapiConnection *conn, mapi_id_t fid,
 					time = nt_time_to_unix (nt);
 					tmtime = gmtime (&time);
 					//FIXME: Move to new libmapi api to get string dates.
-					date.day = tmtime->tm_mday + 1;
+					date.day = tmtime->tm_mday;
 					date.month = tmtime->tm_mon + 1;
 					date.year = tmtime->tm_year + 1900;
 					e_contact_set (contact, mappings[i].field_id, &date);
diff --git a/src/addressbook/e-book-backend-mapi.c b/src/addressbook/e-book-backend-mapi.c
index a0995f6..78da4fa 100644
--- a/src/addressbook/e-book-backend-mapi.c
+++ b/src/addressbook/e-book-backend-mapi.c
@@ -636,7 +636,7 @@ mapi_book_write_props (ExchangeMapiConnection *conn, mapi_id_t fid, TALLOC_CTX *
 		NTTIME nt;
 		struct FILETIME t;
 
-		tmtime.tm_mday = date->day - 1;
+		tmtime.tm_mday = date->day;
 		tmtime.tm_mon = date->month - 1;
 		tmtime.tm_year = date->year - 1900;
 
@@ -656,7 +656,7 @@ mapi_book_write_props (ExchangeMapiConnection *conn, mapi_id_t fid, TALLOC_CTX *
 		NTTIME nt;
 		struct FILETIME t;
 
-		tmtime.tm_mday = date->day - 1;
+		tmtime.tm_mday = date->day;
 		tmtime.tm_mon = date->month - 1;
 		tmtime.tm_year = date->year - 1900;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]