[evolution-patches] Fix for 72308 - date field being displayed in GMT
- From: Parthasarathi Susarla <sparthasarathi novell com>
- To: evolution-patches <evolution-patches ximian com>
- Subject: [evolution-patches] Fix for 72308 - date field being displayed in GMT
- Date: Thu, 17 Feb 2005 14:32:32 +0530
hi,
the attached patch fixes bug #72308
Thanks,
partha
Index: camel-groupwise-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-folder.c,v
retrieving revision 1.26
diff -u -p -r1.26 camel-groupwise-folder.c
--- camel-groupwise-folder.c 17 Feb 2005 08:54:28 -0000 1.26
+++ camel-groupwise-folder.c 17 Feb 2005 08:56:00 -0000
@@ -314,10 +314,11 @@ groupwise_folder_get_message( CamelFolde
camel_mime_message_set_subject (msg, temp_str) ;
dtstring = e_gw_item_get_creation_date (item) ;
if(dtstring) {
+ int offset = 0 ;
time_t time = e_gw_connection_get_date_from_string (dtstring) ;
- struct tm *tm = localtime (&time) ;
- time_t actual_time = mktime (tm) ;
- camel_mime_message_set_date (msg, actual_time, 0) ;
+ time_t actual_time = camel_header_decode_date (ctime(&time), &offset) ;
+ g_print ("offset:%d\n",offset) ;
+ camel_mime_message_set_date (msg, actual_time, offset) ;
}
camel_mime_message_set_from (msg, from_addr) ;
@@ -756,8 +757,11 @@ gw_update_summary ( CamelFolder *folder,
}
temp_date = e_gw_item_get_creation_date(item) ;
- if (temp_date)
- mi->info.date_sent = mi->info.date_received = e_gw_connection_get_date_from_string (temp_date) ;
+ if (temp_date) {
+ time_t time = e_gw_connection_get_date_from_string (temp_date) ;
+ time_t actual_time = camel_header_decode_date (ctime(&time), NULL) ;
+ mi->info.date_sent = mi->info.date_received = actual_time ;
+ }
mi->info.uid = g_strdup (e_gw_item_get_id (item)) ;
mi->info.subject = g_strdup (e_gw_item_get_subject(item)) ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]