Mailing List Archive

Server or dbmail timezone issue?
I posted a while back we were having issues with iPhones reporting the wrong
times on messages and now I’m seeing the same on windows phones.



In the UK we are in BST and the iPhones and winphones are reporting all
messages as BST+1 (i.e. a message timed 0700 BST is reported as 0800). All
other clients (outlook/thunderbird/roundcube/squirrelmail/k9) are working
fine.



I was wondering if the iPhone/winphone are possibly getting their date from
a different source than the other clients? Also I am as certain as I can be
that the iphones/winphones have their timezones set correctly (and other
messages on other servers i.e. hotmail work fine).



I assume this is a timezone issue, so can someone suggest what is going on?



The server is set to BST.



$ date

Thu Jul 17 11:15:59 BST 2014



Mysql is set to BST



+----------------------------+-------------------+

| Variable_name | Value |

+----------------------------+-------------------+

| time_zone | SYSTEM |

| system_time_zone | BST |

| timestamp | 1405592175 |



+---------------------+

| now() |

+---------------------+

| 2014-07-17 11:17:16 |

+---------------------+





If I telnet in to the server and manually query a message I get





* 40 FETCH (INTERNALDATE "17-Jul-2014 06:15:05 +0000" RFC822.SIZE 82465
FLAGS (\Seen NonJunk) ENVELOPE ("Thu, 17 Jul 2014 06:10:53 +0100" "SUBJECT"
etc etc



If I query the database manually for this message the dbmail_datefield gives



1920344, '2014-07-17 00:00:00', '2014-07-17 05:10:53'



Which is fine as a UTC time.



So should the internaldate field reported by the dbmail-imapd be 17-Jul-2014
06:15:05 +0100 ??



And if this is wrong is it an issue with my OS, MySQL or dbmail?


Many thanks for any help this is driving my users mad!

Daniel Schütze





------------------------

CWA International

Balmoral House

9 John Street

London
WC1N 2ES



(t) + 44 (0)20 7242 8444

(e) dms@cwa.uk.com

(w) http://www.cwa.uk.com/
Re: Server or dbmail timezone issue? [ In reply to ]
I've seen posts online that Mac clients definitely use this internal date as
the date, hence the problem.

I see (well ok, someone pointed out to me!) in dm_misc.c line 869

snprintf(_imapdate,IMAP_INTERNALDATE_LEN, "%s +0000", q);

it appears that date_sql2imap is returning the time offset as +0000
regardless of the actual timezone.

Is this an actual issue with the code?

Daniel Schütze


------------------------
CWA International
Balmoral House
9 John Street
London
WC1N 2ES

(t) + 44 (0)20 7242 8444
(e) dms@cwa.uk.com
(w) http://www.cwa.uk.com/

From: Daniel Schutze [mailto:daniel@cwa.uk.com]
Sent: 17 July 2014 11:21
To: 'dbmail@dbmail.org'
Subject: Server or dbmail timezone issue?

I posted a while back we were having issues with iPhones reporting the wrong
times on messages and now I’m seeing the same on windows phones. 

In the UK we are in BST and the iPhones and winphones are reporting all
messages as BST+1 (i.e. a message timed 0700 BST is reported as 0800).  All
other clients (outlook/thunderbird/roundcube/squirrelmail/k9) are working
fine.

I was wondering if the iPhone/winphone are possibly getting their date from
a different source than the other clients?  Also I am as certain as I can be
that the iphones/winphones have their timezones set correctly (and other
messages on other servers i.e. hotmail work fine).

I assume this is a timezone issue, so can someone suggest what is going on?

The server is set to BST.

$ date
Thu Jul 17 11:15:59 BST 2014

Mysql is set to BST

+----------------------------+-------------------+
| Variable_name              | Value             |
+----------------------------+-------------------+
| time_zone                  | SYSTEM            |
| system_time_zone           | BST               |
| timestamp                  | 1405592175        |

+---------------------+
| now()               |
+---------------------+
| 2014-07-17 11:17:16 |
+---------------------+


If I telnet in to the server and manually query a message I get


* 40 FETCH (INTERNALDATE "17-Jul-2014 06:15:05 +0000" RFC822.SIZE 82465
FLAGS (\Seen NonJunk) ENVELOPE ("Thu, 17 Jul 2014 06:10:53 +0100" "SUBJECT"
etc etc

If I query the database manually for this message the dbmail_datefield gives

1920344, '2014-07-17 00:00:00', '2014-07-17 05:10:53'

Which is fine as a UTC time.

So should the internaldate field reported by the dbmail-imapd be 17-Jul-2014
06:15:05 +0100  ??

And if this is wrong is it an issue with my OS, MySQL or dbmail?

Many thanks for any help this is driving my users mad!

Daniel Schütze


------------------------
CWA International
Balmoral House
9 John Street
London
WC1N 2ES

(t) + 44 (0)20 7242 8444
(e) dms@cwa.uk.com
(w) http://www.cwa.uk.com/


_______________________________________________
DBmail mailing list
DBmail@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail