[horde] Weather block shows %r

Brent impuser at bitrealm.com
Thu Sep 20 15:21:32 UTC 2012


Quoting Michael J Rubinsky <mrubinsk at horde.org>:

> Quoting cjdl01 <cjdl01 at brokensolstice.com>:
>
>> Hi,
>>
>> I'm sure someone has mentioned this, but I have looked through the  
>> mail archives and cannot find a solution...
>>
>> My weather block has been showing %r for some time.  I was using  
>> beta software up until a couple days ago, so I shrugged it off as  
>> something that would be fixed when the software became stable...  
>> but it is still there, and I"m using Horde_Service_Weather-1.0.0.
>>
>> Is there a way to fix this?
>
> *Where* is it showing this in the block? Grepping the block code and  
> the Service_Weather library does not turn up this format token. It's  
> most likely coming from your datetime display prefs.

I fixed this myself.  In your horde/config/prefs.php, change the following:

// Time format
$_prefs['time_format'] = array(
     'value' => '%X',
     'type' => 'enum',
     'enum' => array(
         '%X' => strftime('%X') . ' (' . _("Default") . ')',
         '%H:%M:%S' => strftime('%H:%M:%S') . ' (' . _("24-hour format") . ')',
         '%l:%M:%S %p' => strftime('%l:%M:%S %p'),
         '%R' => strftime('%R') . ' (' . _("24-hour format") . ')',
         '%l:%M %p' => strftime('%l:%M %p'),
     ),
     'desc' => _("Choose how to display times:")
);









More information about the horde mailing list