[dev] timezone pref

Jon Parise jon@csh.rit.edu
Thu, 17 May 2001 17:01:16 -0400


On Thu, May 17, 2001 at 04:56:12PM -0400, Jon Parise wrote:

> I was thinking of just doing:
> 
> Index: compose.php
> ===================================================================
> RCS file: /cvs/horde/imp/compose.php,v
> retrieving revision 2.296
> diff -u -r2.296 compose.php
> --- compose.php 2001/05/10 05:17:25     2.296
> +++ compose.php 2001/05/17 20:54:37
> @@ -334,7 +334,9 @@
>  }
>  
>  /* Set the current time zone. */
> -putenv('TZ=' . $prefs->getValue('timezone'));
> +if (!empty($prefs->getValue('timezone'))) {
> +    putenv('TZ=' . $prefs->getValue('timezone'));
> +}
>  
>  /* Run through the action handlers. */
>  switch ($actionID) {

Woops.  This is correct:

Index: compose.php
===================================================================
RCS file: /cvs/horde/imp/compose.php,v
retrieving revision 2.296
diff -u -r2.296 compose.php
--- compose.php 2001/05/10 05:17:25     2.296
+++ compose.php 2001/05/17 21:00:40
@@ -334,7 +334,9 @@
 }
 
 /* Set the current time zone. */
-putenv('TZ=' . $prefs->getValue('timezone'));
+if ($prefs->getValue('timezone') != '') {
+    putenv('TZ=' . $prefs->getValue('timezone'));
+}
 
 /* Run through the action handlers. */
 switch ($actionID) {

-- 
Jon Parise (jon@csh.rit.edu)  .  Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/  :  Computer Science House Member