php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74806 Someone remove Europe/Budapest
Submitted: 2017-06-23 13:01 UTC Modified: 2017-06-23 14:28 UTC
From: alabard at gmail dot com Assigned:
Status: Not a bug Package: timezonedb (PECL)
PHP Version: 7.0.20 OS: Debian Stretch
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: alabard at gmail dot com
New email:
PHP Version: OS:

 

 [2017-06-23 13:01 UTC] alabard at gmail dot com
Description:
------------
The timezone is removed Europe/Budapest and even though I force Europe/Paris in roundcube, but the client is using the timezone - Europe/Budapest, so I cannot use it.

Can you please add in Europe/Budapest timezone table?

Test script:
---------------
new DateTime('now', new DateTimeZone('Europe/Budapest')); 


Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 19301007360 bytes) in /var/www/test.patrikx3.tk/public/index.php on line 2

If I set Europe/Paris. WOrks.




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-06-23 13:14 UTC] derick@php.net
-Status: Open +Status: Feedback
 [2017-06-23 13:14 UTC] derick@php.net
I can't reproduce this:

derick@singlemalt:~ $ php -v
PHP 7.0.21-dev (cli) (built: Jun  1 2017 14:07:31) ( NTS DEBUG )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.21-dev, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.5.5-dev, Copyright (c) 2002-2017, by Derick Rethans

derick@singlemalt:~ $ cat /tmp/74806.php 
<?php
$a = new DateTime('now', new DateTimeZone('Europe/Budapest')); 
var_dump($a);

derick@singlemalt:~ $ php /tmp/74806.php
/tmp/74806.php:3:
class DateTime#1 (3) {
  public $date =>
  string(26) "2017-06-23 15:12:18.000000"
  public $timezone_type =>
  int(3)
  public $timezone =>
  string(15) "Europe/Budapest"
}

Are you using the PHP that comes with Debian?
Or did you compile it yourself?
Did you install the timezonedb extension?
If so, which version?
What does "php --ri date" output?

cheers,
Derick
 [2017-06-23 13:26 UTC] alabard at gmail dot com
-Status: Feedback +Status: Open
 [2017-06-23 13:26 UTC] alabard at gmail dot com
root@server:~/server-scripts/work# php -v
PHP 7.0.20-2 (cli) (built: Jun 14 2017 05:30:04) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.20-2, Copyright (c) 1999-2017, by Zend Technologies

root@server:~/server-scripts/work# php --ri date

date

date/time support => enabled
"Olson" Timezone Database Version => 0.system
Timezone Database => internal
Default timezone => UTC

Directive => Local Value => Master Value
date.timezone => no value => no value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunset_zenith => 90.583333 => 90.583333
date.sunrise_zenith => 90.583333 => 90.583333

root@server:~/server-scripts/work#  cat /tmp/74806.php 
<?php
$a = new DateTime('now', new DateTimeZone('Europe/Budapest')); 
var_dump($a);

root@server:~/server-scripts/work# php /tmp/74806.php

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory
PHP Fatal error:  Out of memory (allocated 2097152) (tried to allocate 19301007360 bytes) in /tmp/74806.php on line 2
root@server:~/server-scripts/work# 


This is the default Debian Stretch with apt install.
 [2017-06-23 13:30 UTC] alabard at gmail dot com
root@server:~/server-scripts/work#  cat /tmp/74806.php 
<?php
$a = new DateTime('now', new DateTimeZone('Europe/Paris')); 
var_dump($a);
root@server:~/server-scripts/work# php /tmp/74806.php
object(DateTime)#1 (3) {
  ["date"]=>
  string(26) "2017-06-23 15:29:36.000000"
  ["timezone_type"]=>
  int(3)
  ["timezone"]=>
  string(12) "Europe/Paris"
}
 [2017-06-23 13:59 UTC] derick@php.net
-Status: Open +Status: Not a bug
 [2017-06-23 13:59 UTC] derick@php.net
OK. Closing this then. Debian patches PHP's date/time support. The default one doesn't use mmap, so this is entirely in their court. Please report this to the Debian project.
 [2017-06-23 13:59 UTC] alabard at gmail dot com
-Status: Not a bug +Status: Open
 [2017-06-23 13:59 UTC] alabard at gmail dot com
echo "<pre>";
echo "\ndate_default_timezone_get\n";
echo date_default_timezone_get();
echo "\n\ntimezone_version_get\n";
echo timezone_version_get();
echo "\n\ntimezone_identifiers_list\n";
echo print_r(timezone_identifiers_list());
echo "\n\ntimezone_abbreviations_list\n";
echo  print_r(timezone_abbreviations_list());
echo "\n\ntimezone_identifiers_list\n";
echo  print_r(timezone_identifiers_list());
echo "\n\ntimezone_location_get\n";
echo print_r(timezone_location_get(new \DateTimeZone('Europe/Budapest')));
echo "\n\n";


It shows that Europe/Budapest is there:
  [315] => Europe/Amsterdam
    [316] => Europe/Andorra
    [317] => Europe/Astrakhan
    [318] => Europe/Athens
    [319] => Europe/Belgrade
    [320] => Europe/Berlin
    [321] => Europe/Bratislava
    [322] => Europe/Brussels
    [323] => Europe/Bucharest
    [324] => Europe/Budapest
    [325] => Europe/Busingen
    [326] => Europe/Chisinau
    [327] => Europe/Copenhagen
    [328] => Europe/Dublin
    [329] => Europe/Gibraltar
    [330] => Europe/Guernsey
    [331] => Europe/Helsinki
    [332] => Europe/Isle_of_Man
    [333] => Europe/Istanbul
    [334] => Europe/Jersey
    [335] => Europe/Kaliningrad
    [336] => Europe/Kiev
    [337] => Europe/Kirov
    [338] => Europe/Lisbon
    [339] => Europe/Ljubljana
    [340] => Europe/London
    [341] => Europe/Luxembourg
    [342] => Europe/Madrid
    [343] => Europe/Malta
    [344] => Europe/Mariehamn
    [345] => Europe/Minsk
    [346] => Europe/Monaco
    [347] => Europe/Moscow
    [348] => Europe/Oslo
    [349] => Europe/Paris
    [350] => Europe/Podgorica
    [351] => Europe/Prague
    [352] => Europe/Riga
    [353] => Europe/Rome
    [354] => Europe/Samara
    [355] => Europe/San_Marino
    [356] => Europe/Sarajevo
    [357] => Europe/Saratov
    [358] => Europe/Simferopol
    [359] => Europe/Skopje
    [360] => Europe/Sofia
    [361] => Europe/Stockholm
    [362] => Europe/Tallinn
    [363] => Europe/Tirane
    [364] => Europe/Ulyanovsk
    [365] => Europe/Uzhgorod
    [366] => Europe/Vaduz
    [367] => Europe/Vatican
    [368] => Europe/Vienna
    [369] => Europe/Vilnius
    [370] => Europe/Volgograd
    [371] => Europe/Warsaw
    [372] => Europe/Zagreb
    [373] => Europe/Zaporozhye
    [374] => Europe/Zurich

 [15] => Array
                (
                    [dst] => 
                    [offset] => 3600
                    [timezone_id] => Europe/Budapest
                )

Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 19301007360 bytes) in /var/www/test.patrikx3.tk/public/index.php on line 14
 [2017-06-23 14:28 UTC] derick@php.net
-Status: Open +Status: Not a bug
 [2017-06-23 14:28 UTC] derick@php.net
Yes, it is there. This is a bug in the Debian specific patch that they made regarding timezones. Please file a bug report with the Debian project and please do not reopen this report again.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC