[dovecot-cvs] dovecot/src/imap cmd-append.c,1.12,1.13
cras at procontrol.fi
cras at procontrol.fi
Thu Oct 24 04:15:41 EEST 2002
- Previous message: [dovecot-cvs] dovecot ChangeLog,1.343,1.344
- Next message: [dovecot-cvs] dovecot/src/lib utc-mktime.c,NONE,1.1 utc-mktime.h,NONE,1.1 utc-offset.c,NONE,1.1 utc-offset.h,NONE,1.1 Makefile.am,1.8,1.9 ioloop.c,1.5,1.6 ioloop.h,1.3,1.4 gmtoff.c,1.1.1.1,NONE gmtoff.h,1.1.1.1,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/imap
In directory danu:/tmp/cvs-serv28234/imap
Modified Files:
cmd-append.c
Log Message:
Fixes to timezone handling which were handling quite badly. added
ioloop_timezone which gets updated with ioloop_time. Changed some GMT
references to UTC. Timezone offsets are in minutes now everywhere instead of
seconds. Fixes for unsigned time_t.
Index: cmd-append.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/cmd-append.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- cmd-append.c 19 Oct 2002 14:51:59 -0000 1.12
+++ cmd-append.c 24 Oct 2002 00:15:38 -0000 1.13
@@ -7,6 +7,8 @@
#include "imap-parser.h"
#include "imap-date.h"
+#include <sys/time.h>
+
/* Returns -1 = error, 0 = need more data, 1 = successful. flags and
internal_date may be NULL as a result, but mailbox and msg_size are always
set when successful. */
@@ -78,7 +80,7 @@
const char *custom_flags[MAIL_CUSTOM_FLAGS_COUNT];
const char *mailbox, *internal_date_str;
uoff_t msg_size;
- int failed;
+ int failed, timezone_offset;
/* <mailbox> [<flags>] [<internal date>] <message literal> */
switch (validate_args(client, &mailbox, &flags_list,
@@ -106,7 +108,9 @@
if (internal_date_str == NULL) {
/* no time given, default to now. */
internal_date = ioloop_time;
- } else if (!imap_parse_datetime(internal_date_str, &internal_date)) {
+ timezone_offset = ioloop_timezone.tz_minuteswest;
+ } else if (!imap_parse_datetime(internal_date_str, &internal_date,
+ &timezone_offset)) {
client_send_tagline(client, "BAD Invalid internal date.");
return TRUE;
}
@@ -126,7 +130,8 @@
o_buffer_flush(client->outbuf);
/* save the mail */
- failed = !box->save(box, flags, custom_flags, internal_date,
+ failed = !box->save(box, flags, custom_flags,
+ internal_date, timezone_offset,
client->inbuf, msg_size);
box->close(box);
- Previous message: [dovecot-cvs] dovecot ChangeLog,1.343,1.344
- Next message: [dovecot-cvs] dovecot/src/lib utc-mktime.c,NONE,1.1 utc-mktime.h,NONE,1.1 utc-offset.c,NONE,1.1 utc-offset.h,NONE,1.1 Makefile.am,1.8,1.9 ioloop.c,1.5,1.6 ioloop.h,1.3,1.4 gmtoff.c,1.1.1.1,NONE gmtoff.h,1.1.1.1,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list