php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #53874 date_default_timezone_set() on header
Submitted: 2011-01-28 23:09 UTC Modified: 2011-01-28 23:44 UTC
From: frame at dynamiccreated dot de Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.3.5 OS: Windows x86
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: frame at dynamiccreated dot de
New email:
PHP Version: OS:

 

 [2011-01-28 23:09 UTC] frame at dynamiccreated dot de
Description:
------------
date_default_timezone_set() does not affect any HTTP-header?
For example created with setcookie(), the setting has no effect.

Why is PHP given "It is not safe to rely on the system's timezone settings" on date() but not on setcookie()?

So if the method is used to correct the timezone (eg. GMT to GMT+1) no header generated by PHP will regarding the changed time. Any cookie set to 1 hour expiration will fail.

If this is bogus, please add a warning to setcookie() linking with date_default_timezone_set().


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-28 23:44 UTC] scottmac@php.net
-Status: Open +Status: Bogus
 [2011-01-28 23:44 UTC] scottmac@php.net
cookies are based on GMT and don't use a timezone.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 10:01:38 2025 UTC