|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-07-24 18:01 UTC] patrice dot flahault at accessprinting dot fr
Description:
------------
The time zone Europe/Paris gives a wrong time.
date_default_timezone_set('Europe/Paris');
should be the same as :
date_default_timezone_set('Europe/Madrid');
but there is a 6 hour difference.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 14:00:01 2025 UTC |
Are you sure you haven't done something else wrong? I just fired up a Centos VM and tried it: <?php date_default_timezone_set('Europe/Paris'); echo date("H:i:s"); echo "\n"; date_default_timezone_set('Europe/Madrid'); echo date("H:i:s"); The output is: 18:08:25 18:08:25 No 6-hour difference there.Looks fine to me.. [david@lyon ~]$ php t.php int(1279996161) string(25) "2010-07-24T20:29:21+02:00" [david@lyon ~]$ cat t.php <?php var_dump(time()); date_default_timezone_set('Europe/Paris'); var_dump(date('c'));Ramus, My code is : date_default_timezone_set('Europe/Paris'); echo date('H:i e') .'<br />'; date_default_timezone_set('Europe/Madrid'); echo date('H:i e') ; You can try it at : www.accessprinting.fr/test/test.php