[Dovecot] Addendum about time zones on AIX 5.1

Jon Roma roma at uiuc.edu
Sun Jul 24 22:12:50 EEST 2005


Timo, I have an addendum to our mail exchange about timezones.

It turns out that the various dovecot applications running on my AIX
5.1 system are logging in GMT instead of in local time.  I noticed this
earlier, but in the course of troubleshooting the issue with mail
reporting the wrong time zone, I forgot to report this to you -- my
apologies!

    Jul 24 18:03:50 zippy dovecot: Dovecot v1.0-stable starting up
    Jul 24 18:07:52 zippy dovecot: imap-login: Login: roma [192.17.16.93]

(The times are, of course, 5 hours ahead -- the difference between my
local time (CST6CDT) and GMT.

I'd guess this problem is caused by the same root cause as the other
problem, so the bad news is that this probably means the TZ patch you
sent me should probably also be applied to the other dovecot executables.

FWIW, as you can see above, I have seen misdated log messages from
dovecot itself as well as imap-login.  Haven't seen from any of the
other applications, but I suppose this behavior is theoretically
possible with all the other dovecot applications.

Jon Roma <roma at uiuc.edu> wrote:

> Timo:
>
> You are very fast.  It's not every day one gets a patch within 11 minutes
> of asking about it. :)
>
> Anyway, I rebuilt my dovecot tree (based on the stable branch as of
> 2005/07/05) with your patch.  It works!  So I consider this problem
> fixed and now I can start considering switching over "for real" to
> dovecot fairly soon.
>
> Thank you for your fantastically speedy service!  :)
>
> Timo Sirainen <tss at iki.fi> wrote:
>
>> On 23.7.2005, at 20:10, Jon Roma wrote:
>>
>>> Was there any more documentation you needed from me on the time zone
>>> issue that we had an email exchange about a couple weeks ago?
>>
>> Oh, I forgot it. Does this patch work:
>>
>> Index: main.c
>> ===================================================================
>> RCS file: /var/lib/cvs/dovecot/src/master/main.c,v
>> retrieving revision 1.62
>> diff -u -r1.62 main.c
>> --- main.c	5 Mar 2005 20:02:07 -0000	1.62
>> +++ main.c	23 Jul 2005 17:20:33 -0000
>> @@ -36,6 +36,7 @@
>>   static struct timeout *to;
>>   static unsigned int settings_reload_hup_count = 0;
>>   static unsigned int log_reopen_usr1_count = 0;
>> +static const char *env_tz;
>>
>>   struct ioloop *ioloop;
>>   struct hash_table *pids;
>> @@ -67,6 +68,8 @@
>>
>>   	/* we'll log through master process */
>>   	env_put("LOG_TO_MASTER=1");
>> +	if (env_tz != NULL)
>> +		env_put(t_strconcat("TZ=", env_tz, NULL));
>>
>>   # ifdef DEBUG
>>   	if (gdb) env_put("GDB=1");
>> @@ -626,7 +629,11 @@
>>   	if (exec_protocol != NULL)
>>   		mail_process_exec(exec_protocol, exec_section);
>>
>> -	/* we don't need any environment anymore */
>> +	/* save TZ environment for child processes. AIX depends on it to get
>> +	   the timezone correctly. */
>> +	env_tz = getenv("TZ");
>> +
>> +	/* we don't need any other environment anymore */
>>   	env_clean();
>>
>>   	open_fds();
>
>
>
>







More information about the dovecot mailing list