Changeset 1058

Show
Ignore:
Timestamp:
08/25/08 22:16:16 (3 months ago)
Author:
laurentj
Message:

ticket #600: automatic timezone setting. p=doubleface

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/jelix/core/defaultconfig.ini.php

    r986 r1058  
    44startModule = "jelix" 
    55startAction = "default:index" 
    6 locale = "fr_FR
     6locale = "en_US
    77charset = "UTF-8" 
    8 timeZone = "Europe/Paris" 
     8 
     9; see http://www.php.net/manual/en/timezones.php for supported values 
     10; if empty, jelix will try to get the default timezone 
     11timeZone =  
    912 
    1013checkTrustedModules = off 
  • trunk/lib/jelix/core/jConfigCompiler.class.php

    r1001 r1058  
    44* @subpackage   core 
    55* @author       Jouanneau Laurent 
    6 * @contributor  Thibault PIRONT < nuKs > 
     6* @contributor  Thibault PIRONT < nuKs >, Christophe Thiriot 
    77* @copyright    2006-2008 Jouanneau laurent 
    8 * @copyright    2007 Thibault PIRONT 
     8* @copyright    2007 Thibault PIRONT, 2008 Christophe Thiriot 
    99* @link         http://www.jelix.org 
    1010* @licence      GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    8888        self::_initResponsesPath($config->_coreResponses); 
    8989 
     90        if (trim($config->timeZone) === '') { 
     91#if PHP50 
     92            $config->timeZone = "Europe/Paris"; 
     93#else 
     94            $config->timeZone = date_default_timezone_get(); 
     95#endif 
     96        } 
    9097 
    9198        /*if(preg_match("/^([a-zA-Z]{2})(?:_([a-zA-Z]{2}))?$/",$config->locale,$m)){ 
     
    147154        self::_initResponsesPath($config['responses']); 
    148155        self::_initResponsesPath($config['_coreResponses']); 
     156        if (trim($config['timeZone']) === '') { 
     157#if PHP50 
     158            $config['timeZone'] = "Europe/Paris"; 
     159#else 
     160            $config['timeZone'] = date_default_timezone_get(); 
     161#endif 
     162        } 
    149163 
    150164        /*if(preg_match("/^([a-zA-Z]{2})(?:_([a-zA-Z]{2}))?$/",$config['locale'],$m)){ 
  • trunk/lib/jelix/CREDITS

    r1046 r1058  
    8686 - Added enhanced service handling (dependency injection) in jClasses (#523, #602) 
    8787 - implementation of "live" exit in command line (#406) 
    88  
     88 - automatic timezone setting (#600) 
    8989 
    9090Contributors 
  • trunk/testapp/var/config/defaultconfig.ini.php

    r838 r1058  
    22;for security reasons , don't remove or modify the first line 
    33 
    4 locale = "fr_FR
     4locale = "en_US
    55charset = "UTF-8" 
    66 
    77; see http://www.php.net/manual/en/timezones.php for supported values 
    8 timeZone = "Europe/Paris" 
     8; if empty, jelix will try to get the default timezone 
     9timeZone =  
    910 
    1011checkTrustedModules = off 
Download in other formats: Unified Diff Zip Archive