ID:               33403
 Updated by:       [EMAIL PROTECTED]
 Reported By:      nickj-phpbugs at nickj dot org
-Status:           Open
+Status:           Assigned
 Bug Type:         Date/time related
 Operating System: Windows2000 SP4
 PHP Version:      5CVS-2005-06-20 (dev)
-Assigned To:      
+Assigned To:      derick
 New Comment:

And assigned to derick. :)



Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to