Birthdays on Calendar 1 day off.[Solved (in 1.4.1)]

Support for IntegraMOD 140

Moderator: Integra Moderator

Birthdays on Calendar 1 day off.[Solved (in 1.4.1)]

PostAuthor: Drop-Forged » Wed Dec 06, 2006 4:53 pm

For some reason there are a handful of members on my site whos Calendar is showing the birthdays one day early.


Now normally this would not be a big deal, but they are pretty good at wishing other members Happy Birthday when it is their birthday, and there are a lot of premature post, and people would like to see this issue fixed.

Ive tried to find the answer, and there was an issue with the Topic Calendar and time zones, but it appears all the fixes are already in place.

Does anyone know how to fix this issue??? <img>
Last edited by Drop-Forged on Thu Dec 07, 2006 2:04 pm, edited 1 time in total.
[url=http][img=left]http://www.christiansoldiers.com/Sig/sig.png[/img][/url]
[url=http]Free IntegraMod 141 Themes at webhutch.net[/url]

Drop-Forged
Integra Member
Integra Member
 
Posts: 167
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 7:07 pm
Cash on hand: 0.00

PostAuthor: IntegraMOD » Wed Dec 06, 2006 5:05 pm

Check the server time zone and the users ofset time
Last edited by IntegraMOD on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Image
Please do not PM for support
User avatar
IntegraMOD
Administrator
Administrator
 
Posts: 459
Likes: 0 post
Liked in: 0 post
Joined: Sat Mar 11, 2006 3:46 pm
Cash on hand: 0.00
Bank: 100.00
Location: Seattle Wa

Re: Birthdays on Calendar 1 day off.

PostAuthor: Drop-Forged » Wed Dec 06, 2006 5:19 pm

The System Time is set to GMT à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒ ¢Ã¢â€š ¬Ã…“ 4 hours, which is what works to make everyone elses settings correct.

And the Users who are having this issue have theirs set correct as well (The ones I checked).

And some even have the same time zone as I do GMT à¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒ ¢Ã¢â€š ¬Ã…“ 5 hours, and mine works fine, and theirs is a day offà¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¦ <img>
Last edited by Drop-Forged on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://www.christiansoldiers.com/Sig/sig.png[/img][/url]
[url=http]Free IntegraMod 141 Themes at webhutch.net[/url]

Drop-Forged
Integra Member
Integra Member
 
Posts: 167
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 7:07 pm
Cash on hand: 0.00

PostAuthor: IntegraMOD » Wed Dec 06, 2006 5:28 pm

Are the users that ar having the problems seeing the post times correct?

For example if they post a test message does the post time correspond to their local/computer time?
Last edited by IntegraMOD on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Image
Please do not PM for support
User avatar
IntegraMOD
Administrator
Administrator
 
Posts: 459
Likes: 0 post
Liked in: 0 post
Joined: Sat Mar 11, 2006 3:46 pm
Cash on hand: 0.00
Bank: 100.00
Location: Seattle Wa

Re: Birthdays on Calendar 1 day off.

PostAuthor: Drop-Forged » Wed Dec 06, 2006 6:58 pm

Yes, they see their post times correctly.
Last edited by Drop-Forged on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://www.christiansoldiers.com/Sig/sig.png[/img][/url]
[url=http]Free IntegraMod 141 Themes at webhutch.net[/url]

Drop-Forged
Integra Member
Integra Member
 
Posts: 167
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 7:07 pm
Cash on hand: 0.00

Re: Birthdays on Calendar 1 day off.

PostAuthor: Drop-Forged » Thu Dec 07, 2006 1:13 am

Ok, I searched the other site and found out that Im the only one with this problem.
While it appears Toast found the cause, it doesnt look like anyone produced a fix yet.

[url=http]Here is the link to the topic.[/url]

Here is what Toast came up with as the cause]thanks for the kind words, Dave. since getting the code and looking at the database structure last night, I've been able to get a better idea of what's going on here.

Here's the problem. Birthdays are stored in the database as simply a date. Displaying birthdays, however uses timestamps. translating from a date to a timestamp sets the persons birthday time to be 00:00, midnight, of their birthday.

in calendar_scheduler.php
Code: Select all
$template->assign_block_vars('hour', array(         'CLASS'       => $color,         'HOUR'       => $l_hour,         'U_HOUR'     => append_sid("./calendar_scheduler.$phpEx?" . (($i==0) ? '' ]

In this particular case, the server time, which is used to calculate current time, is set to GMT -5.  However, event display is tied to a user's timezone.

in functions_calendar.php inside the display_calendar function
[code]$format = ( intval(date('Ymd', $offset_date)) == intval(date('Ymd', cal_date(time(),$board_config['board_timezone']))) ) ? '<b>%s</b>' ], $offset_date)),                 'U_DATE'     => append_sid($phpbb_root_path . "./calendar_scheduler.$phpEx?d=" . $offset_date . "&fid=$fid"),                 )             );


so, as you can see, in cases where the user's timezone is earlier than the server's time, events timestamped less than the timezone difference will be displayed incorrectly.

One solution could be removing the call to cal_date in events display. Another would be to break birthdays out with separate formatting than other events.[/quote]

Does anyone know how to fix this???
Last edited by Drop-Forged on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://www.christiansoldiers.com/Sig/sig.png[/img][/url]
[url=http]Free IntegraMod 141 Themes at webhutch.net[/url]

Drop-Forged
Integra Member
Integra Member
 
Posts: 167
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 7:07 pm
Cash on hand: 0.00

Re: Birthdays on Calendar 1 day off.

PostAuthor: Teelk » Thu Dec 07, 2006 8:01 am

I believe it was evolver that fixed this in IM141, but I think it's too large a change to provide a simple patch I'm afraid.
Last edited by Teelk on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
Teelk
Dev Team
Dev Team
 
Posts: 1309
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 14, 2006 5:25 pm
Cash on hand: 0.00
Location: Canada

Re: Birthdays on Calendar 1 day off.

PostAuthor: Drop-Forged » Thu Dec 07, 2006 2:01 pm

Ok, if it is fixed in 141, all is good.

I will just let them know that it should be fixed on the next site update... :D
Last edited by Drop-Forged on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://www.christiansoldiers.com/Sig/sig.png[/img][/url]
[url=http]Free IntegraMod 141 Themes at webhutch.net[/url]

Drop-Forged
Integra Member
Integra Member
 
Posts: 167
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 7:07 pm
Cash on hand: 0.00

PostAuthor: ScottDaMan » Thu Feb 01, 2007 11:24 pm

I have IM141 installed and I can say this is not fixed. It is showing birthdays one day early.
Last edited by ScottDaMan on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http]Star Wars United[/url] - My IM141 Board.

ScottDaMan
Members
Members
 
Posts: 46
Likes: 0 post
Liked in: 0 post
Joined: Wed Jan 31, 2007 11:40 am
Cash on hand: 0.00

PostAuthor: IntegraMOD » Sat Feb 03, 2007 5:47 pm

have you set the board timezone correct? ie the timezone of the server where the board is held?
Last edited by IntegraMOD on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Image
Please do not PM for support
User avatar
IntegraMOD
Administrator
Administrator
 
Posts: 459
Likes: 0 post
Liked in: 0 post
Joined: Sat Mar 11, 2006 3:46 pm
Cash on hand: 0.00
Bank: 100.00
Location: Seattle Wa

PostAuthor: ScottDaMan » Sun Feb 04, 2007 10:13 pm

Yeah, I have. I found the timezone by just uploading something through FTP and noting the hour difference. My new topic on this: http://www.integramod.com/forum/viewtop ... highlight=
Last edited by ScottDaMan on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http]Star Wars United[/url] - My IM141 Board.

ScottDaMan
Members
Members
 
Posts: 46
Likes: 0 post
Liked in: 0 post
Joined: Wed Jan 31, 2007 11:40 am
Cash on hand: 0.00


Return to IntegraMOD 140

Who is online

Registered users: Bing [Bot], Google [Bot]