From:             nickj-phpbugs at nickj dot org
Operating system: Windows2000 SP4
PHP version:      5CVS-2005-06-20 (dev)
PHP Bug Type:     Date/time related
Bug description:  date() function support for "Asia/Dubai" timezone formats on 
Win32 platform.

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 bug report at http://bugs.php.net/?id=33403&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33403&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=33403&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=33403&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=33403&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=33403&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=33403&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=33403&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=33403&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=33403&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=33403&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=33403&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=33403&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=33403&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33403&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=33403&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=33403&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=33403&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33403&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=33403&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33403&r=mysqlcfg

Reply via email to