[kronolith] kronolith: two post-install snags
cjdl01
cjdl01 at brokensolstice.com
Wed Oct 3 19:07:32 UTC 2012
Quoting Brent <impuser at bitrealm.com>:
> Quoting cjdl01 <cjdl01 at brokensolstice.com>:
>
>>>> Since there doesn't seem to be an issue with my c library or my
>>>> php, should I file a bug for this? Or is there something else we
>>>> can do?
>>>
>>> Since I cannot reproduce this, a bug report won't help either. I'm
>>> afraid you have to track this down yourself.
>>>
>>> --
>>> Jan Schneider
>>
>>
>> OK.... I'm not really a programmer though. Can you point me in the
>> right direction? Is there a way to force horde to get something
>> other than %r?
>>
>> I had the same problem with the weather block, and someone posted a
>> fix that involved a minor code tweak. In horde/config/prefs.php I
>> changed:
>>
>> // 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:")
>> );
>>
>> to
>>
>> // Time format
>> $_prefs['time_format'] = array(
>> 'value' => '%H:%M:%S',
>> '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:")
>> );
>>
>> And that fixed it (actually I made a prefs.local.php like a good
>> boy). I had really hoped it would carry over into Kronolith, but
>> it didn't. Is there something similar I can do for Kronolith?
>>
>> Any help you can give me here would be greatly appreciated. Thanks.
>
> I would be the one that helped fixed your %r in Weather. It seems
> that the following function is somehow not working correctly in the
> kronolith config. If you run the strftime in a standalone php, it
> is correct. However, if you view source on the resulting .html that
> is sent to users, the time is coming as %r instead. The .ics file
> generated is correct, so something gets munged in the .html
> generation. No idea what.
>
> The fix/hack:
>
> Edit: <hordedir>/kronolith/templates/itip/notification.html.php
>
> Search for: strftime('%x %X')
>
> Change to: strftime('%c')
>
> Note: leaving this alone and reading mail via Horde, you do not get
> a %r. You only get the %r if you send to something like Gmail or an
> Exchange server. The %r is in the .html generated, but not in the
> .ics file.
>
> I note that %r in the strftime format means "time in am and pm
> notation". Somehow, the %X (preferred time designation without the
> date) is returning %r. Could it be something is not setting the
> preferred timed designation correctly somewhere? A standalone .php
> script returns the correct time when using %x %X.
>
> brent
Brent,
You nailed it! Thank you! (again!).
I cannot help but wonder what is going on here... I don't know about
you, but I am using a pretty stock install of Debian Squeeze. Perhaps
there is something different about squeeze as compared to fedora,
mint, *BSD or whatever people are running their horde on.
I guess the real question is, should these changes just be part of the
normal horde code? I mean, if it works 100% of the time, then why use
the %X when it works <100% of the time. Might be worth looking into...
Anyway, thank you Brent and Jan, My system is now working nominally.
Swimmingly, even. :)
-Chris
More information about the kronolith
mailing list