php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25261 Inconsistent time zone from date()
Submitted: 2003-08-26 15:55 UTC Modified: 2003-08-26 16:58 UTC
From: radio_jed at hotmail dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.3.2 OS: Win32 (XP Corp. Pro)
Private report: No CVE-ID: None
 [2003-08-26 15:55 UTC] radio_jed at hotmail dot com
Description:
------------
I am running PHP 4.3.2 with Apache2 (yes, I'm sorry), and I'm trying to use date() to display my computer's time zone. I am in PST (Pacific Standard Time, America/Los_Angeles), but date() is returning "BST" when I use "T" in date()'s format (the other parameters in the format string don't influence this at all.) I'm not sure what BST is.

Unchecking "automatically set clock for daylight savings time changes" in Windows' time applet did not fix this problem, either, unlike bug #24912 suggests; not even after a reboot. 

Install info:
PHP 4.3.2 ZIP binary from php.net (I did not compile my own)
Apache/Win32 2.0.47, using Apache2 SAPI module
Windows XP Corporate Professional Edition
No relevant differences in php.ini.

Reproduce code:
---------------
<?php
  /* run on PHP 4.3.2, Win XP Corp. Pro
     I'm not sure if this affects other OSes
     I removed function's real purpose, not necessary */
file = "some/file";
printf("modified %s", date("Hi T", filemtime($file)));
?>

/* that's my original problem, this demonstrates as well:
<?php
  print(date("Hi T"));
?>
*/

Expected result:
----------------
modified 1340 PST

Actual result:
--------------
modified 1340 BST

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-26 15:57 UTC] radio_jed at hotmail dot com
The time zone in Windows is correct, I was not negligent in setting PST -- I just checked.
 [2003-08-26 16:11 UTC] radio_jed at hotmail dot com
Found bug #23467, this user is having the same problem I am. I will add to that thread, rather than keep searching here.
 [2003-08-26 16:58 UTC] jay@php.net
Since this is a duplicate, it's bogus. 
 
J 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Oct 05 04:01:29 2024 UTC