Forums / Developer / Problems with timezone in 4.0.2

Problems with timezone in 4.0.2

Author Message

Anders Berre

Monday 09 March 2009 1:45:31 am

Hi,

Have some problems with outputing correct time in eZ Publish.
The time on created object is one hour wrong. I have tried to just make a small script as a module/view that outputs current time, and it is also wrong:

echo strftime( "%d-%m-%Y %H-%M" ).'<br>';
echo date( 'd-m-Y H-i', time() );

When i just makes a standalone script on the server and call it from the console I got the corret time. So the problem is eZ Publish.

I have tried these soloutions:

putenv("TZ=GMT+1");
echo strftime( "%d-%m-%Y %H-%M" ).'<br>';
echo date( 'd-m-Y H-i', time() );
putenv("TZ=Europe/Oslo);
echo strftime( "%d-%m-%Y %H-%M" ).'<br>';
echo date( 'd-m-Y H-i', time() );
[TimeZoneSettings]
TimeZone=Europe/Oslo
[TimeZoneSettings]
TimeZone=GMT+1

Any suggestions?

Sincerely,

Anders Sandvik Berre
http://www.netmaking.no/

Bin LIU

Tuesday 07 April 2009 1:03:44 am

check php.ini

[Date]
date.timezone = "Europe/Paris"

is the same in ezpublish site.ini

[TimeZoneSettings]
TimeZone=Europe/Paris

I had the same problem, and I make the same config, all is ok now

=== Lagardère Active ===

Fetch random
http://projects.ez.no/la_fetch_random
LA Static Cache
http://projects.ez.no/lastaticcache
LA Bookmarks (jquery)
http://projects.ez.no/labookmark
LA Calendar (jquery)
http://projects.ez.no/lacalendar

My site ez
http://lingping.info

Anders Berre

Tuesday 14 April 2009 3:23:56 am

Ah, nice!

Now the time is corret, thank you very much!

Sincerely,

Anders Sandvik Berre
http://www.netmaking.no/