[klutz] Timezone in Klutz - FIX

Jan Schneider jan at horde.org
Wed Mar 10 01:06:39 PST 2004


Zitat von nathanf <nathanf at waterandsnow.net>:

> Here is a fix for the timezone problem in Klutz.
> Just needed to add:
>
> NLS::setTimeZone();
>
>
> klutz/lib/base.php
>
> ---------------------------
>
>     // Registry.
>     if (Util::nonInputVar('session_control') == 'none') {
>         $registry = &Registry::singleton(HORDE_SESSION_NONE);
>     } elseif (Util::nonInputVar('session_control') == 'readonly') {
>         $registry = &Registry::singleton(HORDE_SESSION_READONLY);
>     } else {
>         $registry = &Registry::singleton();
>     }
>     if (is_a(($pushed = $registry->pushApp('klutz', 
> !defined('AUTH_HANDLER'))), 'PEAR_Error')) {
>         if ($pushed->getCode() == 'permission_denied') {
>             Horde::authenticationFailureRedirect();
>         }
>         Horde::fatal($pushed, __FILE__, __LINE__, false);
>     }
>     $conf = &$GLOBALS['conf'];
>     @define('KLUTZ_TEMPLATES', $registry->getParam('templates'));
>
> +   // Set the timezone variable, if available.
> +   NLS::setTimeZone();
>
>     // Notification system.
>     $notification = &Notification::singleton();
>     $notification->attach('status');
>
>     // Find the base file path of Klutz.
>     @define('KLUTZ_BASE', dirname(__FILE__) . '/..');
>
> ---------------------------

AFAICS this is NOT the correct solution. It will mess the comic cache
completely up if users from different timezones will access Klutz.

But Marcus might know it better.

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - Neue Wege des Lernens
http://www.tip4all.de - Deine private Tippgemeinschaft


More information about the klutz mailing list