Ticket #600: timezone.jConfigCompiler.patch

File timezone.jConfigCompiler.patch, 1.0 kB (added by doubleface, 6 months ago)

Same modification, but in jConfigCompiler

  • a/lib/jelix/core/jConfigCompiler.class.php

    old new  
    7676        self::_initResponsesPath($config->responses); 
    7777        self::_initResponsesPath($config->_coreResponses); 
    7878 
     79        if (trim($config->timeZone) === '') { 
     80            $config->timeZone = date_default_timezone_get(); 
     81        } 
     82 
    7983 
    8084        /*if(preg_match("/^([a-zA-Z]{2})(?:_([a-zA-Z]{2}))?$/",$config->locale,$m)){ 
    8185            if(!isset($m[2])){ 
     
    135139 
    136140        self::_initResponsesPath($config['responses']); 
    137141        self::_initResponsesPath($config['_coreResponses']); 
     142 
     143        if (trim($config['timeZone']) === '') { 
     144            $config['timeZone'] = date_default_timezone_get(); 
     145        } 
    138146 
    139147        /*if(preg_match("/^([a-zA-Z]{2})(?:_([a-zA-Z]{2}))?$/",$config['locale'],$m)){ 
    140148            if(!isset($m[2])){ 
Download in other formats: Original Format