Patch to allow 12 hour date to display for emails sent today.

Mario Vazquez mariovazq at gmail.com
Thu Dec 14 19:11:47 CET 2006


I had the same problem Dough has with the time in emails.  I submited
the patch I have been using in my server since beta1, and has been put
in hold for a long time.

http://trac.roundcube.net/trac.cgi/ticket/1483879
If you see the date, it was posted 5 months ago.

I have the patch updated to the current post beta2 SVN tree, in case
you need it.

Mario
---------------------------------------------------------------------

On 12/11/06, Doug Mandell <dmandell at gristle.org> wrote:
> Whoops, meant to send this to the list.  Anyhow, here's the fixed version of my patch, if there's a better way for me to submit these please let me know.
>
> Thanks,
>
> Doug
>
> Index: roundcubemail/config/main.inc.php.dist
> ===================================================================
> --- roundcubemail/config/main.inc.php.dist      (revision 400)
> +++ roundcubemail/config/main.inc.php.dist      (working copy)
> @@ -107,6 +107,9 @@
>  // the default locale setting
>  $rcmail_config['locale_string'] = 'en';
>
> +// use this format for today's date display
> +$rcmail_config['date_today'] = 'H:i';
> +
>  // use this format for short date display
>  $rcmail_config['date_short'] = 'D H:i';
>
> Index: roundcubemail/program/include/main.inc
> ===================================================================
> --- roundcubemail/program/include/main.inc      (revision 400)
> +++ roundcubemail/program/include/main.inc      (working copy)
> @@ -1687,7 +1687,7 @@
>
>    // define date format depending on current time
>    if ($CONFIG['prettydate'] && !$format && $timestamp > $today_limit)
> -    return sprintf('%s %s', rcube_label('today'), date('H:i', $timestamp));
> +    return sprintf('%s %s', rcube_label('today'), date($CONFIG['date_today'] ?
> $CONFIG['date_today'] : 'H:i', $timestamp));
>    else if ($CONFIG['prettydate'] && !$format && $timestamp > $week_limit)
>      $format = $CONFIG['date_short'] ? $CONFIG['date_short'] : 'D H:i';
>    else if (!$format)
>
>
>
>




More information about the Dev mailing list