Change the sign of the default date offset when none is supplied.

2000-12-09  Not Zed  <NotZed@HelixCode.com>

	* camel-mime-message.c (camel_mime_message_set_date): Change the
	sign of the default date offset when none is supplied.
	(camel_mime_message_set_date): Also do dst if its dst (forward 1
	hour).  Fixes #928 + some.

svn path=/trunk/; revision=6860
This commit is contained in:
Not Zed
2000-12-08 14:22:36 +00:00
committed by Michael Zucci
parent 0a02275389
commit e2b2aeceea
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2000-12-09 Not Zed <NotZed@HelixCode.com>
* camel-mime-message.c (camel_mime_message_set_date): Change the
sign of the default date offset when none is supplied.
(camel_mime_message_set_date): Also do dst if its dst (forward 1
hour). Fixes #928 + some.
2000-12-06 Not Zed <NotZed@HelixCode.com>
* tests/lib/camel-test.h (check): Change line no format so that

View File

@ -191,13 +191,14 @@ camel_mime_message_set_date(CamelMimeMessage *message, time_t date, int offset)
date = time(0);
local = localtime(&date);
offset = 0;
#if defined(HAVE_TIMEZONE)
tz = timezone;
#elif defined(HAVE_TM_GMTOFF)
tz = local->tm_gmtoff;
#endif
offset = ((tz/60/60) * 100) + (tz/60 % 60);
offset = -(((tz/60/60) * 100) + (tz/60 % 60));
if (local->tm_isdst>0)
offset += 100;
}
message->date = date;
message->date_offset = offset;