[imp] Display date/time when viewing a message
Jan Schneider
jan@horde.org
Wed, 10 Oct 2001 12:38:27 +0200
The problem with strtotime() is that it that it only parses time strings
correctly if they are formatted as strtotime() expects it.
Unfortunately that's not always the case, I get malformed date header from time
to time.
This already screws up things in the mailbox view for example the sorting
order. But at least I can guess the correct date in the message view if the
date header is displayed in its raw format.
Jan.
Zitat von Alexander Skwar <ASkwar@DigitalProjects.com>:
> Hi1
>
> When viewing a message, the date/time was displayed exactly as it was
> transmitted. With this patch applied, the date/time is displayed the
> same way it is displayed when composing a new message. IMO this looks
> better, as there isn't yet another date/time formt the user has to get
> used to.
>
> --- message.php.alt Wed Oct 10 07:59:04 2001
> +++ message.php Wed Oct 10 07:58:45 2001
> @@ -371,7 +371,11 @@
> HTTP_Compress::start();
> }
>
> -if (isset($h->date)) $dat = htmlspecialchars(MIME::decode($h->date));
> +if (isset($h->date)){
> + $dat = htmlspecialchars(MIME::decode($h->date));
> + $stamp = strtotime($dat);
> + $dat = strftime($conf['compose']['date_format'], $stamp);
> +}
> if (isset($h->to)) $to = buildAddressLinks($h->to);
> if (isset($h->from)) $frm = buildAddressLinks($h->from);
> if (isset($h->cc)) $cc = buildAddressLinks($h->cc);
>
>
> Alexander Skwar
> --
> How to quote: http://learn.to/quote (de) http://quote.6x.to (en)
> Homepage: http://www.digitalprojects.com | http://www.iso-top.de
> iso-top.de - Die günstige Art an Linux Distributionen zu kommen
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
>
> --
> IMP mailing list: http://horde.org/imp/
> Archive: http://marc.theaimsgroup.com/?l=imp&r=1&w=2
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org
>
>
::::::::::::::::::::::::::::::::::::::::
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::