|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-04-11 10:44 UTC] derick@php.net
[2007-04-12 06:40 UTC] dobes at lnx dot cz
[2007-04-13 18:41 UTC] dobes at lnx dot cz
[2007-04-13 20:13 UTC] tony2001@php.net
[2007-04-13 21:42 UTC] dobes at lnx dot cz
[2007-04-13 21:51 UTC] tony2001@php.net
[2007-04-13 22:47 UTC] dobes at lnx dot cz
[2007-04-13 23:56 UTC] derick@php.net
[2007-04-14 17:07 UTC] dobes at lnx dot cz
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 30 13:00:01 2025 UTC |
Description: ------------ I'm getting data with time in CET timezone. Displaying is in local time (by configuration) So I have to convert time from CET to Euprope/Prague (ie CET or CEST) When I set CET in date_default_timezone_set(), I return CET or CEST (CET + DST). When I set CEST, I get error. Luckily one state is using CET without CEST (Algeria) so I use date_default_timezone_set('Africa/Algiers') instead. But I get the same behaving with WAT (http://en.wikipedia.org/wiki/West_Africa_Time) and WAST is using only one sate and I get WAT/WAST too. For getting local time is ok to use Continent/City but CET is not CEST. Reproduce code: --------------- //date_default_timezone_set('CET'); // itme as YYMMDDHHIISS sscanf($time, '%2d%2d%2d%2d%2d%2d', $year, $month, $day, $hour, $minute, $second); $timestamp = mktime($hour,$minute,$second,$month,$day,$year); date_default_timezone_set('Europe/Prague'); echo date('D d.m. H:i:s', $timestamp); Expected result: ---------------- CET != CEST (!!!) so i expect the same result like //date_default_timezone_set('Africa/Algiers'); // itme as YYMMDDHHIISS sscanf($time, '%2d%2d%2d%2d%2d%2d', $year, $month, $day, $hour, $minute, $second); $timestamp = mktime($hour,$minute,$second,$month,$day,$year); date_default_timezone_set('Europe/Prague'); echo date('D d.m. H:i:s', $timestamp); Actual result: -------------- Wrong behaving. PHP expecting CET = CEST in CEST range.