php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73909 Instanbul local time is incorrect
Submitted: 2017-01-10 18:09 UTC Modified: 2017-01-11 14:21 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: pgabardo at graphiq dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 7.1.0 OS: MacOS
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: pgabardo at graphiq dot com
New email:
PHP Version: OS:

 

 [2017-01-10 18:09 UTC] pgabardo at graphiq dot com
Description:
------------
I have a function to compute the local time (relative to California) of any given timezone (in AREA/REGION format) which uses date_default_timezone_set(). The result for 'Europe/Istanbul' is one hour behind the actual local time.

Test script:
---------------
date_default_timezone_set('Europe/Istanbul');
echo date("Y-m-d\TH:i:s");

Expected result:
----------------
2017-01-10T21:07:24+02:00

Actual result:
--------------
2017-01-10T20:07:24+02:00

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-11 12:54 UTC] contact at frank-liepert dot de
This shouldn't be a problem with PHP itself but an outdated timezonedb. Turkey switched to permanent +03:00. See also http://mm.icann.org/pipermail/tz-announce/2016-September/000041.html
 [2017-01-11 14:21 UTC] heiglandreas@php.net
-Status: Open +Status: Not a bug
 [2017-01-11 14:21 UTC] heiglandreas@php.net
The code you provided would print out the date without the offset. 

And as already explained that sounds more like an issue of an outdated timezoneDB.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 11:00:02 2026 UTC