Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8039 Posts in 1852 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityEverything ElseGeneral Use (Moderators: scott, DanO, Marty)Last day of the month error
Pages: [1]   Go Down
Print
Author Topic: Last day of the month error  (Read 336 times)
0 Members and 1 Guest are viewing this topic.
jdillon
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: March 27, 2004, 02:11:00 AM »

I am getting a strange error. Whenever events fall on the last day of the month, I get the following message:

ERROR PROCESSING TEMPLATE
There was an error in your template file. Below is the template file and also the perl code generated from it to help you with debugging.

Day '32' out of range 1..31 at (eval 1) line 64

And here is line 64:
$schedules = &Event::getEventsInRange($db,timegm(0,0,0,$DATE,$MONTH-1,$YEAR-1900),timegm(0,0,0,$DATE+1,$MONTH-1,$YEAR-1900)-1);

We are in the process of migrating to a new web server (Linux box/Apache 1.3/Perl 5.8.3) and I do not get the error on the current server (the one we are migrating from).

I have tried deleting the events and adding them back with no luck. Any help would be greatly appreciated.

Thanks!
Jon Dillon

[This message has been edited by jdillon (edited March 27, 2004).]

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 227

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: March 27, 2004, 12:48:00 PM »

Have you made sure the time zone offset is set correctly in the 'Template Options'(?) section? I don't know if that would cause it but may be possible.

Dan O.

------------------

Logged
jdillon
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: March 28, 2004, 01:43:00 PM »

Thanks DanO. I checked but the time zone offset is set correctly. Does anyone have any other ideas?

Thanks--Jon

------------------

Logged
Zim
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #3 on: April 02, 2004, 08:07:00 AM »

Its complaint is legitimate    You are asking it (on line 64) for the events from 4/30/2004 to 4/(30+1)/2004  (note the $DATE + 1)

Not sure why a getEventsInRange (for a 2-day period) is happening, when all you want is the detail view of one event.

Not a fix, but a step towards the problem.

Mike

------------------

Logged
jdillon
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #4 on: April 02, 2004, 11:43:00 AM »

Mike,

I got the code in question from a post by TubaDave back on May 2, 2002 (http://www.calendarscript.com/support/forum/Forum4/HTML/000169.html).

This code is used to get the date and time into the events view. I tried taking the DATE+1 out of that line and it broke the script. I don't know enough Perl to explain why it is needed but apparently it is.

Jon

------------------

Logged
Zim
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #5 on: April 02, 2004, 01:27:00 PM »

In the thread you reference, see the 2nd to bottom post by johannes.

Mike

------------------

Logged
jdillon
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #6 on: April 02, 2004, 03:59:00 PM »

That did it Mike! Should have read that post through again. I appreciate your help.

Jon

------------------

Logged
Pages: [1]   Go Up
Print
Jump to: