php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35200 date_default_timezone_set() doesn't work with time()
Submitted: 2005-11-12 17:52 UTC Modified: 2005-11-12 19:09 UTC
From: lunter at interia dot pl Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.1.0RC4 OS: winXP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lunter at interia dot pl
New email:
PHP Version: OS:

 

 [2005-11-12 17:52 UTC] lunter at interia dot pl
Description:
------------
date_default_timezone_set() doesn't work with time()

Reproduce code:
---------------
<?
 date_default_timezone_set('Europe/London');
 print(time().'<br>');
 date_default_timezone_set('Europe/Warsaw');
 print(time().'<br>');
?>

Expected result:
----------------
Different values.

Actual result:
--------------
The same values.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-12 18:28 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

time() returns seconds from 1.1.1970 00:00 GMT - that\'s 
for good reasons timezone independet 
 [2005-11-12 19:09 UTC] lunter at interia dot pl
Sorry, I make a mistake.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 09:01:30 2025 UTC