Skip to content

Commit

Permalink
Addded info about new config param 'Config.timezone'
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Apr 21, 2012
1 parent f651ca7 commit a9ba7f3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions en/appendices/new-features-in-cakephp-2-2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,13 @@ CakeTime
The ``$userOffset`` parameter has been replaced with ``$timezone`` parameter in all relevant functions.
So instead of numeric offset you can now pass in a timezone string or DateTimeZone object.
Passing numeric offsets for ``$timezone`` parameter is still possible for backwards compatibility.

Configuration
=============

A new config parameter 'Config.timezone' is available which you can set to user's timezone string.
eg. You can do ``Configure::write('Config.timezone', 'Europe/Paris')``.
If a method of ``CakeTime`` class is called with ``$timezone`` parameter as null and 'Config.timezone' is set, then the
value of 'Config.timezone' will be used. This feature allows you to set user's timezone just once instead
of passing it each time in function calls.

0 comments on commit a9ba7f3

Please sign in to comment.