#33403 [Fbk->Opn]: date() function support for "Asia/Dubai" timezone formats on Win32 platform.
| From: | nickj-phpbugs at nickj dot org | Date: | Fri, 01 Jul 2005 07:27:24 +0000 |
| Subject: | #33403 [Fbk->Opn]: date() function support for "Asia/Dubai" timezone formats on Win32 platform. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-81255@lists.php.net to get a copy of this message | ||
ID: 33403
User updated by: nickj-phpbugs at nickj dot org
Reported By: nickj-phpbugs at nickj dot org
-Status: Feedback
+Status: Open
Bug Type: Date/time related
Operating System: win32 only
PHP Version: 5CVS-2005-06-20
Assigned To: derick
New Comment:
Building of 5.1 CVS snapshots on Windows seems to have been stalled
today, so I have been unable to verify fix - will do this on Monday
instead.
Previous Comments:
------------------------------------------------------------------------
[2005-06-30 23:41:41] derick@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
This should work now (but wait until the next snapshot is generated).
------------------------------------------------------------------------
[2005-06-20 01:49:52] sniper@php.net
And assigned to derick. :)
------------------------------------------------------------------------
[2005-06-20 01:35:49] nickj-phpbugs at nickj dot org
Description:
------------
[Excerpt from bug 20382, for a separate problem that should be logged
as a new bug]:
On the Win32 platform the date() format does not currently understand
timezone names like "Asia/Dubai".
Example code:
<?php
putenv("TZ=Australia/Adelaide");
$tStamp = mktime (17, 17, 17, 1, 1, 1971);
print "tStamp=". date("l Y-m-d H:i:s T", $tStamp). "\n";
$strtotime_tstamp = strtotime("Monday", $tStamp);
print "result=".date("l Y-m-d H:i:s T", $strtotime_tstamp)."\n";
print "wanted=Monday 00:00:00\n\n";
putenv("TZ=Asia/Baku");
$tStamp = mktime (17, 17, 17, 1, 1, 1971);
print "tStamp=". date("l Y-m-d H:i:s T", $tStamp). "\n";
$strtotime_tstamp = strtotime("Monday", $tStamp);
print "result=".date("l Y-m-d H:i:s T", $strtotime_tstamp)."\n";
print "wanted=Monday 00:00:00\n\n";
putenv("TZ=Europe/Brussels");
$tStamp = mktime (17, 17, 17, 1, 1, 1971);
print "tStamp=". date("l Y-m-d H:i:s T", $tStamp). "\n";
$strtotime_tstamp = strtotime("Monday", $tStamp);
print "result=".date("l Y-m-d H:i:s T", $strtotime_tstamp)."\n";
print "wanted=Monday 00:00:00\n\n";
?>
======================================================
Results on a Windows2000 SP4 box are as follows:
G:\PHP bugs\php5.1-dev\php5-win32-200506171830>php-cgi.exe
..\..\new-test.php
Content-type: text/html
X-Powered-By: PHP/5.1.0-dev
tStamp=Friday 1971-01-01 17:17:17 Aus
result=Sunday 1971-01-03 14:30:00 Aus
wanted=Monday 00:00:00
tStamp=Friday 1971-01-01 17:17:17 Asi
result=Sunday 1971-01-03 20:00:00 Asi
wanted=Monday 00:00:00
tStamp=Friday 1971-01-01 17:17:17 Eur
result=Sunday 1971-01-03 23:00:00 Eur
wanted=Monday 00:00:00
G:\PHP bugs\php5.1-dev\php5-win32-200506171830>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33403&edit=1