[horde] unknown date problem

Jan Schneider jan at horde.org
Mon Oct 31 10:31:31 PST 2005


http://www.php.net/strtotime

Zitat von synrat <synrat at wirewalk.org>:

> Jan Schneider wrote:
>
>> Zitat von synrat <synrat at wirewalk.org>:
>>
>>
>>> messages with GMT set to 0000 don't get their
>>> dates displayed properly in the mailbox list.
>>> I see "unknown date" in the date field instead.
>>> When I click on the message, then the full date header
>>> is displayed properly in the "Date" field, including 0000 GMT.
>>> I suppose this could be blamed on the mail client ( in this
>>> specific case Blackberry PDA's built in e-mail ), not supplying
>>> the correct GMT offset, but this behavior can only be observed in IMP.
>>
>>
>> Date strings are parsed with PHP's strtotime() function in the 
>> mailbox view. If you get an unknown date, it's because PHP doesn't 
>> recognize it.
>>
>> Jan.
>>
>
>
> so it can't convert string to date because there are zeros in GMT 
> offset ?? wouldn't that be a bug ?
>
> from imp/mailbox.php
>
> /* Formats the header date string nicely. */
>     if (empty($h->date) || (($udate = strtotime($h->date, 
> $curr_time)) == -1)) {
>
> what does -1 do at the end of this line ? changing it to 1 or +1 
> seems to fix this problem just fine.
>
>
>
> here's an example of the difference between "non working" and 
> "working" date headers.
>
> Date: Thu, 27 Oct 2005 18:41:22 +0000 GMT
>
> Date: Mon, 31 Oct 2005 13:00:00 -0500 (EST)
>
>
>
>



Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the horde mailing list