Bugs: Bug Report

rosc2112 at yahoo.com rosc2112 at yahoo.com
Sat Apr 22 23:36:12 CST 2006


Bug Report

From: rosc2112 at yahoo.com
IP: 216.222.233.166
Generated from http://www.eggfaq.com/cgi-bin/display.cgi?bug.html
Sun Apr 23 02:35:41 EDT 2006

1) INFORMATION ABOUT YOUR EGGDROP

Eggdrop version:     1.6.17

Make type:           dynamic

Patches/modules:
none

2) INFORMATION ABOUT TCL

Tcl version:         8.4.11

Scripts used:

3) INFORMATION ABOUT THE OS

OS:                  Linux

OS version:          2.4.32

4) BUG DETAILS

Last context:
n/a

Description of bug:
[clock scan] does not handle leap years (eg, [clock scan feb 29 2004] does not work), and cannot calculate date ranges above or below a certain point.
Apparent years prior to 1900, and later than 2359 are out of range.


Condition to repeat:
bind msg - testfu testfu

proc testfu {nick uhost hand text} {
#these dates cause error:
set leapyear {}; set pastlimit {};set futurelimit {}; set lowrange {};set highrange {}
if {[catch {set leapyear [clock scan "Feb 29 2004"]} error]} {set leapyear $error}
if {[catch {set pastlimit [clock scan "Mar 1 1899"]} error]} {set pastlimit $error}
if {[catch {set futurelimit [clock scan "Mar 1 2360"]} error]} {set futurelimit $error}
set lowrange [clock scan "Mar 1 1900"]
set highrange [clock scan "Mar 1 2359"]
puthelp "PRIVMSG $nick :Dates: leapyear:$leapyear pastlimit:$pastlimit futurelimit:$futurelimit lowrange:$lowrange highrange:$highrange"
}








More information about the Bugs mailing list