php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #61522 E_STRICT for compatibility TZs
Submitted: 2012-03-27 02:48 UTC Modified: 2022-05-13 13:37 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: a at b dot c dot de Assigned: derick (profile)
Status: Closed Package: Date/time related
PHP Version: 5.4.0 OS: generic
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: a at b dot c dot de
New email:
PHP Version: OS:

 

 [2012-03-27 02:48 UTC] a at b dot c dot de
Description:
------------
A bunch of the Timezones supported by PHP come with a warning in the manual: "Please do not use any of the timezones listed here (besides UTC), they only exist for backward compatible reasons."

I'd just like to suggest having functions that take timezone strings as arguments (such as date_default_timezone_set) trigger an E_STRICT notice when passed one of these compatibility zone names.

Should the list change in future, this could give developers a heads-up.


Test script:
---------------
<?php
date_default_timezone_set('EST');
?>

Expected result:
----------------
PHP Strict Standards:  Use of compatibility Timezone ID 'EST' should be replaced with current name in test.php on line 2.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2022-05-13 13:37 UTC] derick@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: derick
 [2022-05-13 13:37 UTC] derick@php.net
E_STRICT no longer exists. If you still thing this is a something you'd like to see a warning for, please file a ticket at https://github.com/php/php-src/issues.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC