[Dovecot] Date sort-order ignoring timezone, and a few Q's.

Timo Sirainen tss at iki.fi
Wed Jul 9 22:09:20 EEST 2003


On Wed, 2003-07-09 at 21:13, Charlie Brady wrote:
> > > > > > One small glitch I have noticed is that when the client requests a list
> > > > > > of messages sorted by date, the timezone is ignored.
> Better for me would be a patch against 0.99.10.

Index: message-date.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-mail/message-date.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- message-date.c	22 Apr 2003 17:47:58 -0000	1.7
+++ message-date.c	9 Jul 2003 14:51:56 -0000	1.8
@@ -208,7 +208,7 @@
 	if (*time == (time_t)-1)
 		return FALSE;
 
-	*time += *timezone_offset * 60;
+	*time -= *timezone_offset * 60;
 
 	return TRUE;
 }
Index: index-search.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-search.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- index-search.c	15 Jun 2003 03:42:29 -0000	1.74
+++ index-search.c	9 Jul 2003 14:51:57 -0000	1.75
@@ -297,7 +297,7 @@
 	if (!message_date_parse(sent_value, sent_value_len,
 				&sent_time, &timezone_offset))
 		return 0;
-	sent_time -= timezone_offset * 60;
+	sent_time += timezone_offset * 60;
 
 	switch (type) {
 	case SEARCH_SENTBEFORE:




More information about the dovecot mailing list