Проблема с часовым поясом для Europe/Moscow в intl

marliotto

Новичок
Здравствуйте!
В России отменили переход на зимнее время, но почему то расширение Intl все равно делает сдвиг на час назад.
Кто нибудь сталкивался с подобной проблемой?

Код для теста
PHP:
<?php

$tz = new DateTimeZone('Europe/Moscow');
$date = new DateTime('1 march', $tz);

echo "PHP: " . phpversion() . "\n";
echo "Intl: " . phpversion('intl') . "\n";
echo "TZ: " . $tz->getName() . "\n";

echo "\n";

echo "Native:\n";
echo $date->format('H:i:s d.m.Y');
echo "\n";

echo "Intl:\n";
$formatter = new IntlDateFormatter('RU_ru', IntlDateFormatter::FULL, IntlDateFormatter::FULL, $tz->getName());
echo $formatter->format($date);
echo "\n";

У меня результат такой:

PHP: 5.3.10-1~dotdeb.1
Intl: 1.1.0
TZ: Europe/Moscow

Native:
00:00:00 01.03.2012
Intl:
среда, 29 февраля 2012 г. 23:00:00 Московское стандартное время
 

marliotto

Новичок
Просто обновление версии может за собой понести другие проблемы
 

marliotto

Новичок
Изменение часового пояса, это не решение проблемы. В данный момент так и сделано.
 

fixxxer

К.О.
Партнер клуба
а там случайно не ICU timezone database используется? Если так, то подойдет инструкция по ее ручному обновлению для Mac OS / iPhone (гуглится влет)
 

marliotto

Новичок
а там случайно не ICU timezone database используется? Если так, то подойдет инструкция по ее ручному обновлению для Mac OS / iPhone (гуглится влет)
вот это ближе к истине. Только можете, пожалуйста, рассказать подробней.
Я так и не смог найти информацию как его обновить на Debian Squeeze.
Удалось обновить сам ICU до версии 4.8.1.1, но проблема не исчезла.
Может теперь нужно еще и сам intl пересобрать? Вот только это мне тоже не удается
Выдает ошибку
# pecl install -f intl-1.1.0
downloading intl-1.1.0.tgz ...
Starting to download intl-1.1.0.tgz (142,204 bytes)
..............................done: 142,204 bytes
97 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
Specify where ICU libraries and headers can be found [DEFAULT] :
building in /var/tmp/pear-build-root/intl-1.1.0
running: /tmp/pear/temp/intl/configure --with-icu-dir=DEFAULT
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20090626
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking whether to enable internationalization support... yes, shared
checking for icu-config... /usr/bin/icu-config
checking for location of ICU headers and libraries... /usr
checking for ICU 3.4 or greater... found 4.8.1.1
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/var/tmp/pear-build-root/intl-1.1.0':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details
ERROR: `/tmp/pear/temp/intl/configure --with-icu-dir=DEFAULT' failed
 

fixxxer

К.О.
Партнер клуба
не, ну раз у тебя дебиан, просто банальный apt-get upgrade то не пробовал? =)
 

fixxxer

К.О.
Партнер клуба
Ну наверное из squeeze-backports тогда поставить надо
 
Сверху