Server time

Found a bug? Tell us!!
pano
Regular
Posts: 24
Joined: Tue Apr 05, 2005 11:15 am

Server time

Post 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,
pano
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Server time

Post by garvinhicking »

Did you try to just enter "7" as server offset, and not "+7"?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
pano
Regular
Posts: 24
Joined: Tue Apr 05, 2005 11:15 am

Post 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...
pano
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
pano
Regular
Posts: 24
Joined: Tue Apr 05, 2005 11:15 am

Post 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
pano
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
pano
Regular
Posts: 24
Joined: Tue Apr 05, 2005 11:15 am

Post 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
pano
pano
Regular
Posts: 24
Joined: Tue Apr 05, 2005 11:15 am

Post by pano »

Looks like now works fine.

Thanks
pano
dale
Regular
Posts: 14
Joined: Tue Feb 14, 2006 3:36 am
Contact:

Post 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.)
dale
Regular
Posts: 14
Joined: Tue Feb 14, 2006 3:36 am
Contact:

Post by dale »

Could someone give me some pointers on this one? Or where else do I need to check, etc.

Thanks in advance. :)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Maybe you could try to use the 1.0-beta2 version instead of patching up your 0.9?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
jdrodrigues
Regular
Posts: 36
Joined: Sun Feb 12, 2006 9:27 pm
Location: London
Contact:

Post 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 ?
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.
Judebert
---
Website | Wishlist | PayPal
jdrodrigues
Regular
Posts: 36
Joined: Sun Feb 12, 2006 9:27 pm
Location: London
Contact:

Post by jdrodrigues »

Hi, Thank you for the interest. Yes, new entries are also a day behind. Any thoughts ?
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.
Judebert
---
Website | Wishlist | PayPal
Post Reply