Page 2 of 2

Posted: Fri Dec 15, 2006 6:31 am
by chickens
There is a very simple way of telling the time of the server. Create a file called time.php (or whatever you want) and put this code in it

Code: Select all

 <?php print date("F j, Y, G:i:s"); ?> 
Upload it to your server and run it. This will show you the exact time and date on your server in the following format: December 14, 2006, 21:20:51 pm

Once you get the exact time difference between your time and the servers time you can make the offset whatever you would like. So, if the server's time is truly 24 hours off you can do a +24 to get the day accurate. I did not test this nor look at the code to verify this will work correctly. I am just working off my PHP experiences in the past.

Posted: Fri Dec 15, 2006 12:07 pm
by jdrodrigues
No, it doesn't make any difference.

Here's the result of the date cmd on the Pair server:

Fri Dec 15 05:18:48 EST 2006

And the date on my computer is:

Fri Dec 15 10:19:13 GMT 2006


OK, I've just checked and think I know what has happened.

I made an entry with the date "2006-12-12 00:00". After saving, I opened the same entry for editing and the date is now "2006-12-11 20:00"

So I just did this:

UPDATE serendipity_entries SET timestamp = (timestamp + 18000);

And it seems OK now.

Posted: Fri Dec 15, 2006 3:07 pm
by judebert
Phew! Glad this one is solved. Now for the fly in the ointment: does it work for new entries, too?

Posted: Fri Dec 15, 2006 3:37 pm
by jdrodrigues
Yes, new entries work just fine. I was confused about this, because since I thought using "05:00" for the server offset wasn;t working (I was only looking at pre-existing entries), I had removed the offset. So, even the new entries were being saved at -5 hours. I have now reinserted the "05:00" offset and all is well.

Thanks again !

Posted: Sun Jun 03, 2007 10:01 am
by mehulved
I am using serendipity-1.1.2 while posting I saw that the server time was 10:30 hrs behind my local time. So, I tried to correct it but it didn't work. Searching for it I reached this thread. Finally I realised that I needed to give 10.5 instead or 10:30 to get the correct time on my blog. Now, this is quite a non-standard way, atleast for me. As I've learnt, it should always be hh:mm so can the future releases have it that way so it becomes easier to figure?

Posted: Sun Jun 03, 2007 5:09 pm
by garvinhicking
Hi!

If we were to change that to "10:30" it would mean that installations would break were people already entered "10.30".

Also, the setup instructions say: "'Enter the amount of hours between". So there's nothing said about "minutes" which uses your notatiion. Thus, 10.5 is expected and clear, IMHO?

Thanks though for mentioning this issue!

Best regards,
Garvin

Posted: Sun Jun 03, 2007 9:15 pm
by mehulved
garvinhicking wrote:Hi!

If we were to change that to "10:30" it would mean that installations would break were people already entered "10.30".
Anyway to have a hh:mm format in the future because most of the software out there follows that format, too. That if the developers do agree that it will be better to have hh:mm format.
garvinhicking wrote: Also, the setup instructions say: "'Enter the amount of hours between". So there's nothing said about "minutes" which uses your notatiion. Thus, 10.5 is expected and clear, IMHO?
Yeah that is quite clear now.
garvinhicking wrote: Thanks though for mentioning this issue!

Best regards,
Garvin
And thanks for your time and efforts too.