diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-14 01:43:07 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-14 01:43:07 +0200 |
commit | 35d6b35182b6ed65c34ca7bf06975b93f4cd403b (patch) | |
tree | 550e2351d5670951033338c9d394ca647ce584ee /user_guide_src/source/helpers | |
parent | d461934184d95b0cfb2feec93f27b621ef72a5c2 (diff) | |
parent | 7400965017f87c3aba18bf75ed7d732359fd577d (diff) |
Merge pull request #1223 from Razican/new_date
New now() function for the Date helper
Diffstat (limited to 'user_guide_src/source/helpers')
-rw-r--r-- | user_guide_src/source/helpers/date_helper.rst | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index 18216c5a2..1b7177fc2 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -21,13 +21,21 @@ now() ===== Returns the current time as a Unix timestamp, referenced either to your -server's local time or GMT, based on the "time reference" setting in -your config file. If you do not intend to set your master time reference -to GMT (which you'll typically do if you run a site that lets each user -set their own timezone settings) there is no benefit to using this +server's local time or any PHP suported timezone, based on the "time reference" +setting in your config file. If you do not intend to set your master time reference +to any other PHP suported timezone (which you'll typically do if you run a site that +lets each user set their own timezone settings) there is no benefit to using this function over PHP's time() function. -.. php:method:: now() +.. php:method:: now($timezone = NULL) + + :param string $timezone: The timezone you want to be returned + :returns: integer + +:: + echo now("Australia/Victoria"); + +If a timezone is not provided, it will return time() based on "time_reference" setting. mdate() ======= |