From: lkc at pobox dot sk Operating system: Windows PHP version: 5.2.3 PHP Bug Type: cURL related Bug description: cURL cookiejar resets default timezone to GMT
Description: ------------ Using cURL with COOKIEJAR option resets timezone setting to GMT. This only occurs if: 1. The default timezone is set using date.timezone in php.ini, NOT through date_default_timezone_set(). 2. The cookie file contains timestamp(s). Reproduce code: --------------- echo date_default_timezone_get(), "\n"; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt"); curl_setopt($ch, CURLOPT_URL, "http://www.google.com"); $f = curl_exec($ch); curl_close($ch); echo date_default_timezone_get(), "\n"; Expected result: ---------------- Show identical timezones. Actual result: -------------- Second timezone is always GMT. -- Edit bug report at http://bugs.php.net/?id=42040&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42040&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42040&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42040&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42040&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42040&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42040&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42040&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42040&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42040&r=support Expected behavior: http://bugs.php.net/fix.php?id=42040&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42040&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42040&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42040&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42040&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42040&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42040&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42040&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42040&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42040&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42040&r=mysqlcfg