Page 1 of 2

Server time

Posted: Wed Dec 28, 2005 11:55 am
by pano
Hi everybody,

it looks like the calendar of my blog lives in yesterday.

My server time is 7 hours less than the place where i live, so i set up +7 in the configuration of the blog (it tells me actual time is 4:00am when here is 11:00am, so i write +7).

But the calendar marks as today the day before today. Today is 28 (already for 11:43am hours) but for my blog is still 27, even in the server is already 4:43am)

The blog is www.casarusia.com. Maybe in some minutes or hours it will show 28 as today, i dont know when it decides to change.

Someone has had the same problem? I updated about 3 weeks ago to the last release of Serendipity (running Serendipity 0.9.1 and PHP 4.3.10).

Best regards,

Re: Server time

Posted: Wed Dec 28, 2005 7:18 pm
by garvinhicking
Did you try to just enter "7" as server offset, and not "+7"?

Best regards,
Garvin

Posted: Thu Dec 29, 2005 10:22 am
by pano
Hi Garvin,

yes, i tried it... but with the same result as +7. I wrote the + symbol after try only with the 7, but nothing...

Posted: Thu Dec 29, 2005 2:49 pm
by garvinhicking
Okay, I'll have a look at this more detailed in the next days.

Is it only the calendar that's behaving wrong? Or also the entry time itself?

Regards,
Garvin

Posted: Fri Dec 30, 2005 6:08 pm
by pano
Hi Garvin,

when i create a new entry, the time it's correct. Only the calendar behaves like this.

I updated to the 0.9.1 version and the strange behavior began... I did not see anything strange in the code that generates the calendar.

Thanks for everything

Posted: Fri Dec 30, 2005 6:23 pm
by garvinhicking
I think I've found that bug.

However it was in since Serendipity 0.8, so I don't think it every worked properly?

Can you please try this:

1. Open your include/plugins_internal.inc.php file
2. Search for this:

Code: Select all

$now             = serendipity_serverOffsetHour(time(), true);
3. Replace that with:

Code: Select all

$now             = serendipity_serverOffsetHour(time());
This will turn the server timezones to not the double of 7, but the right value.

Please tell me if that works out for you, so that I can commit it to the official trunk.

Regards,
Garvin

Posted: Fri Dec 30, 2005 7:11 pm
by pano
Garvin, thanks a lot for your fast replies (as usually). Tomorrow morning i will check if this change works, because is in the morning (according to my time zone) when the calendar shows the wrong today's date.

Thanks again

Posted: Thu Jan 12, 2006 4:37 pm
by pano
Looks like now works fine.

Thanks

Posted: Mon Mar 20, 2006 5:29 am
by dale
Forgive me for pulling this thread back up again. :oops:

I followed through the corrections on v0.9.1. I think there are two places to correct? one for gregorian, the other for jalili. After correcting both, the calendar displays the date accurately; but the date of the post itself is still displayed as yesterday. (My timezone offset is 13.)

Posted: Thu Mar 30, 2006 12:50 pm
by dale
Could someone give me some pointers on this one? Or where else do I need to check, etc.

Thanks in advance. :)

Posted: Thu Mar 30, 2006 12:51 pm
by garvinhicking
Maybe you could try to use the 1.0-beta2 version instead of patching up your 0.9?

Regards,
Garvin

Posted: Thu Dec 14, 2006 1:10 pm
by jdrodrigues
Hello everyone,

And so I've resurrected this thread again...

I just moved to a new hosting service (pair.com Pittsburgh USA) from namesco/simply.com (UK) - what a difference in performance, price, features. Should have done it months ago.

Anyway, I spent a tense couple of days transfering the site and its myriad modifications, etc. I also took the opportunity to upgrade from 1.0.9 beta (or something like that) to 1.0.4

Everythings works better than before.... except the dates in the article/entry listings (in serendipity_entryFooter) are a day behind !

The new server is only 5 hours behind me (I'm in London). I tried putting in '5' as the offset, but it didn't make any difference, so I left it blank to the server default.

Help ?

Posted: Thu Dec 14, 2006 4:00 pm
by judebert
Are the new entries also behind? I haven't looked at that code, but it makes sense to me that it wouldn't change old entries.

If new entries are reported with the correct time, then an SQL command will be required to change the old dates.

Posted: Fri Dec 15, 2006 1:51 am
by jdrodrigues
Hi, Thank you for the interest. Yes, new entries are also a day behind. Any thoughts ?

Posted: Fri Dec 15, 2006 3:59 am
by judebert
Hmm, well... no, not really.

You mentioned that using "5" didn't make any difference. Does using "10" or "7" make any changes? I'm thinking that maybe the server isn't set to UTC, but is using its own time zone or something.