From 7400965017f87c3aba18bf75ed7d732359fd577d Mon Sep 17 00:00:00 2001 From: Iban Eguia Date: Wed, 13 Jun 2012 22:57:50 +0200 Subject: Fixed some stuff in documentation. --- application/config/config.php | 7 ++++--- system/helpers/date_helper.php | 4 ++-- user_guide_src/source/helpers/date_helper.rst | 9 ++++++--- user_guide_src/source/installation/upgrade_300.rst | 4 ++-- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/application/config/config.php b/application/config/config.php index fd6a1aeb0..31ff2024d 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -362,9 +362,10 @@ $config['compress_output'] = FALSE; | Master Time Reference |-------------------------------------------------------------------------- | -| You can set any PHP supported timezones to be the master timezone when -| you call the now() function. 'local' string can be used to get the local -| time. +| Options are 'local' or any PHP supported timezone. This pref tells the +| system whether to use your server's local time as the master 'now' +| reference, or convert it to any PHP supported timezone. See the 'date +| helper' page of the user guide for information regarding date handling. | */ $config['time_reference'] = 'local'; diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php index 131508f69..a5c46e47b 100644 --- a/system/helpers/date_helper.php +++ b/system/helpers/date_helper.php @@ -42,8 +42,8 @@ if ( ! function_exists('now')) /** * Get "now" time * - * Returns time() based on the timezone parameter or on the "timezone" - * setting + * Returns time() based on the timezone parameter or on the + * "time_reference" setting * * @param string * @return int diff --git a/user_guide_src/source/helpers/date_helper.rst b/user_guide_src/source/helpers/date_helper.rst index 7bbfd4f15..1b7177fc2 100644 --- a/user_guide_src/source/helpers/date_helper.rst +++ b/user_guide_src/source/helpers/date_helper.rst @@ -20,9 +20,12 @@ The following functions are available: now() ===== -Returns the current time as a Unix timestamp, based on the "timezone" parameter. -All PHP available timezones are supported. You can also use 'local' timezone, and -it will return time(). +Returns the current time as a Unix timestamp, referenced either to your +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($timezone = NULL) diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index debf9662c..d8a3d5bc1 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -46,8 +46,8 @@ 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 can now select all PHP supported timezones in the `time_reference` setting, listed here: `Supported timezones `_. You can also -use 'local' if you want to get time(). +You can now select all PHP supported timezones in the `time_reference` setting, listed here: +`Supported timezones `_. You can also use 'local' if you want to get time(). Step 6: Move your errors folder =============================== -- cgit v1.2.3-24-g4f1b