[imp] Timezone problem -- fix

Klemen Humerca klemen at humerca.com
Fri Mar 21 19:01:52 PST 2003


I'm using horde 2.2 and IMP 3.2. This problem is very strange. As I decribed
in my earlier mail:

1.) I have this problem. If I try this input: "date" on my server I get
this:

Fri Mar 21 12:46:30 GMT+1 2003

This is correct time!!


2.) But when I use php function "date('r')", I get this in my browser:

Fri, 21 Mar 2003 12:46:30 -0100

This is also correct time, but -1 is wrong!


3.) When I use IMP I get wrong dates in INBOX or in compose window. So I
tried and I put "echo date('r') before "set the current time zone" in
/imp/mailbox.php:
echo date('r')";

/* Set the current time zone. */
if ($prefs->getValue('timezone') != '') {
    putenv('TZ=' . $prefs->getValue('timezone'));
}

I get this:

Fri, 21 Mar 2003 12:46:30 -0100


4.) I tried and I put "echo date('r') after "set the current time zone" in
/imp/mailbox.php:

/* Set the current time zone. */
if ($prefs->getValue('timezone') != '') {
    putenv('TZ=' . $prefs->getValue('timezone'));
}

echo date('r')";

I get this:

Fri, 21 Mar 2003 14:46:30 +0100

This time is wrong for +2 hours. Where is the problem?


5.) I tried and I put "echo date('r') before "set the current time zone" in
/imp/compose.php:

echo date('r')";

/* Set the current time zone. */
if ($prefs->getValue('timezone') != '') {
    putenv('TZ=' . $prefs->getValue('timezone'));
}

I get this:

Fri, 21 Mar 2003 12:46:30 -0100


6.) I tried and I put "echo date('r') before "set the current time zone" in
/imp/compose.php:

/* Set the current time zone. */
if ($prefs->getValue('timezone') != '') {
    putenv('TZ=' . $prefs->getValue('timezone'));
}

echo date('r')";

I get this:

Fri, 21 Mar 2003 14:46:30 +0100


So, if I set Time zone to Default, shown time in compose window is right,
but shown time in INBOX is wrong. And if I set Time zone to
Europe/Ljubljana, shown time in compose is wrong, but shown time in INBOX is
right.

Where is the problem?


Klemen Humerca

-----e-mail&web---------
 klemen at humerca.com
 www.humerca.com
 forum.humerca.com
------------------------

     .-.
     /v\    L   I   N   U   X
    // \\        >Rules<
   /(   )\
    ^^-^^
----- Original Message -----
From: "Chuck Hagenbuch" <chuck at horde.org>
To: <imp at lists.horde.org>
Sent: Friday, March 21, 2003 5:26 PM
Subject: Re: [imp] Timezone problem -- fix


| Quoting Klemen Humerca <klemen at humerca.com>:
|
| > I had this problem. When I selected Time zone in Preferences, date in
| > Inbox was correct. But date in composing message was wrong. If I
selected
| > Default time zone, Inbox time was wrong and Compose time was correct.
Then
| > I commented line in imp/compose.php
| >
| >
| > /* Set the current time zone. */
| > //if ($prefs->getValue('timezone') != '') {
| > //    putenv('TZ=' . $prefs->getValue('timezone'));
| > //}
| >
| >
| > and now it works fine...
|
| Please at least tell us what versions of Horde/IMP you're using...
|
| -chuck
|
| --
| Charles Hagenbuch, <chuck at horde.org>
| "... It is not more light we need, but more warmth! We die of cold, not of
| darkness. It is not the night that kills, but the frost." - Miguel de
Unamuno
|
| --
| IMP mailing list
| Frequently Asked Questions: http://horde.org/faq/
| To unsubscribe, mail: imp-unsubscribe at lists.horde.org
|



More information about the imp mailing list