Tuesday 15 March 2011

php - CakePhp Config.timezone gives me wrong time -



php - CakePhp Config.timezone gives me wrong time -

if utilize in core.php

configure::write('config.timezone', 'europe/paris');

time displayed 2 hr less

date_default_timezone_set('europe/paris');

should set else in core.php ?

thanks.

you should check comment above configuration value:

config.timezone available in can set users' timezone string. if method of caketime class called $timezone parameter null , config.timezone set, value of config.timezone used. feature allows set users' timezone 1 time instead of passing each time in function calls.

the config.timezone configuration value applies caketime utility class, wich utilize value in case no timezone explicitly beingness passed it.

in order configure timezone used built-in php functions you'll have utilize date_default_timezone_set().

see also

http://book.cakephp.org/2.0/en/appendices/2-2-migration-guide.html#configure http://book.cakephp.org/2.0/en/core-utility-libraries/time.html

php cakephp cakephp-2.5

No comments:

Post a Comment