summaryrefslogtreecommitdiffstats
path: root/user_guide_src
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src')
-rw-r--r--user_guide_src/source/changelog.rst1
-rw-r--r--user_guide_src/source/helpers/date_helper.rst22
-rw-r--r--user_guide_src/source/installation/upgrade_300.rst10
3 files changed, 23 insertions, 10 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 25b42b2e0..80507b284 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -45,6 +45,7 @@ Release Date: Not Released
- Helpers
+ - Date helper will now return now() based on the timezone you specify.
- ``create_captcha()`` accepts additional colors parameter, allowing for color customization.
- ``url_title()`` will now trim extra dashes from beginning and end.
- Added XHTML Basic 1.1 doctype to :doc:`HTML Helper <helpers/html_helper>`.
diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst
index 18216c5a2..b6c6ed4bb 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()
=======
diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst
index 63c4227dc..503e5366c 100644
--- a/user_guide_src/source/installation/upgrade_300.rst
+++ b/user_guide_src/source/installation/upgrade_300.rst
@@ -41,8 +41,14 @@ need to rename the `$active_record` variable to `$query_builder`.
$active_group = 'default';
// $active_record = TRUE;
$query_builder = TRUE;
-
-Step 5: Move your errors folder
+
+Step 5: Change your use of the Date helper's now() function
+===========================================================
+
+Function now() has been modified. You can see the changes in :doc:`Date Helper <../helpers/date_helper>`
+You must replace $config['time_reference'] with $config['timezone'] in your config.php file.
+
+Step 6: Move your errors folder
===============================
In version 3.0.0, the errors folder has been moved from "application/errors" to "application/views/errors". \ No newline at end of file