cvs: qaweb / write-test.php
| From: | Zoe Slattery | Date: | Tue, 13 Jan 2009 16:15:05 +0000 |
| Subject: | cvs: qaweb / write-test.php | ||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-64599@lists.php.net to get a copy of this message | ||
zoe Tue Jan 13 16:15:05 2009 UTC
Modified files:
/qaweb write-test.php
Log:
Modification to guidance on time zone setting.
http://cvs.php.net/viewvc.cgi/qaweb/write-test.php?r1=1.22&r2=1.23&diff_format=u
Index: qaweb/write-test.php
diff -u qaweb/write-test.php:1.22 qaweb/write-test.php:1.23
--- qaweb/write-test.php:1.22 Tue May 13 14:09:55 2008
+++ qaweb/write-test.php Tue Jan 13 16:15:05 2009
@@ -3,7 +3,7 @@
$TITLE = "Writing Tests [PHP-QAT: Quality Assurance Team]";
$SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__));
-/* $Id: write-test.php,v 1.22 2008/05/13 14:09:55 stevseea Exp $ */
+/* $Id: write-test.php,v 1.23 2009/01/13 16:15:05 zoe Exp $ */
common_header();
?>
@@ -201,12 +201,16 @@
these examples have affected PHP tests in the past.</p>
<p>Make sure that any test touching parsing or display of dates uses a
-hard-defined timezone - preferable 'UTC':</p>
-
+hard-defined timezone - preferable 'UTC'. It is important tha this is defined in
+the file section using:</p>
<pre>
---INI--
-date.timezone=UTC
+date_default_timezone_set('UTC');
+</pre>
+and not in the INI section. This is because of the order in which settings are checked which is:
+<pre>
+date_default_timezone_set() -> TZ environmental -> INI setting -> System Setting
</pre>
+If a TZ environmental varaibale is found the INI setting will be ignored.
<p>Tests that run, or only have have matching EXPECT output, on 32bit
platforms can use a SKIPIF section like:</p>