diff options
author | Iban Eguia <admin@razican.com> | 2012-03-27 18:36:15 +0200 |
---|---|---|
committer | Iban Eguia <admin@razican.com> | 2012-03-27 18:36:15 +0200 |
commit | 7bf0a4ff35efc758ef43b3a848e655285946b8b6 (patch) | |
tree | 7d1ab063257edbc343ffb7c37fb7fdd462ed1e6d /user_guide_src/source/helpers | |
parent | 8310595f0e80f72ac790478b8a7dfc6470051639 (diff) |
Added doccumentation for the new date helper.
Diffstat (limited to 'user_guide_src/source/helpers')
-rw-r--r-- | user_guide_src/source/helpers/date_helper.rst | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index b21d147bd..b8c3dd076 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -20,14 +20,20 @@ The following functions are available: 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 -function over PHP's time() function. - -.. php:method:: now() +Returns the current time as a Unix timestamp, based on the "timezone" parameter. +All PHP available timezones are supported. + +.. php:method:: now($timezone = NULL) + + :param string $timezone: The timezone you want to be returned + :returns: integer + +:: + + $tz = "Australia/Victoria"; + echo now($tz); + +If a timezone is not provided, it will return time() based on "timezone" setting. mdate() ======= |