Reputation: 1527
If I use in core.php
Configure::write('Config.timezone', 'Europe/Paris');
Time displayed will be 2 hour less than
date_default_timezone_set('Europe/Paris');
Should I set something else in my core.php ?
Thanks.
Upvotes: 1
Views: 626
Reputation: 60473
You should check the comment above that configuration value:
Config.timezone
is available in which you can set users' timezone string. If a method of CakeTime class is called with $timezone parameter as null andConfig.timezone
is set, then the value ofConfig.timezone
will be used. This feature allows you to set users' timezone just once instead of passing it each time in function calls.
The Config.timezone
configuration value only applies to the CakeTime
utility class, wich will use that value in case no timezone is explicitly being passed to it.
In order to configure the timezone used by built-in PHP functions you'll have to use date_default_timezone_set()
.
See also
Upvotes: 1