[Dovecot] Time zone problems with dovecot-1.0-stable (20050705 nightly snapshot)

Jon Roma roma at uiuc.edu
Sat Jul 23 22:43:13 EEST 2005


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