How to change server time

Phoca Guestbook - creating guestbooks in Joomla! CMS
Bonevier
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 31 Jan 2008, 15:42

Hello,I&

Post by Bonevier »

Hello,

I've correctly changed the server time to my local time in the joomla global configuration.

But when I post in my guestbook, the time shows up british time (CET - 1). I'm on CET (Sweden).

What form do I have to edit to get the correct servertime when posting?

Thanks,
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49138
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Hi, Phoca Guestbook

Post by Jan »

Hi, Phoca Guestbook use standard Joomla! timestamp:

// Create the timestamp for the date
$row->date = gmdate('Y-m-d H:i:s');
If you find Phoca extensions useful, please support the project
John
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 04 Feb 2008, 00:27

How should you chang

Post by John »

How should you change that line of code to adjust for the Swedish time?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49138
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

If you save date to

Post by Jan »

If you save date to database, you must save it this way:

Y-m-d H:i:s

If you get it from database, you can convert it to your swedish format, see: http://cz2.php.net/manual/en/function.date.php
If you find Phoca extensions useful, please support the project
Raevmi
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 06 Feb 2008, 21:47

Thanx for this guest

Post by Raevmi »

Thanx for this guestbook.
I also have one question about the time.
When I did a posting on the frontpage the time was right at the same time I did the posting in my guestbook. What I saw is that the posting time in my guestbook was about one hour back.
Posting Frontpage 20:30 guestbook posting 19:30
How is it possible if the guestbook is using Joolma time?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49138
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Hi, you right, Jooml

Post by Jan »

Hi, you right, Joomla! saves the date one hour back. If it get the date from database, it converters it to normal date... The converting was missed in Phoca Guestbook ...
Download the Phoca Guestbook now (version 1.1.3), it should be fixed...

Jan
If you find Phoca extensions useful, please support the project
Raevmi
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 06 Feb 2008, 21:47

Ok thanx. But when I

Post by Raevmi »

Ok thanx. But when I try to download version 1.1.3 the popup comes with com_phocaguestbook_v1.1.2_beta.zip
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49138
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Post by Jan »

Fixed
If you find Phoca extensions useful, please support the project
nhaga
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 26 May 2009, 11:21

Re: How to change server time

Post by nhaga »

Hi!
I have version 1.3.2 and I still have this problem.
All posts get a time stamp with 1 hour lag.

Could I change the code to fix this?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49138
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How to change server time

Post by Jan »

Hi, try to see your time settings in global configuration of Joomla!
If you find Phoca extensions useful, please support the project
Post Reply