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

Timo Sirainen tss at iki.fi
Sat Jul 23 20:21:39 EEST 2005


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();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://dovecot.org/pipermail/dovecot/attachments/20050723/d95e06a0/attachment-0001.bin>


More information about the dovecot mailing list