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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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: Tue Jul 01 21:01:35 2025 UTC