[Aimmath-developers] [ aimmath-Bugs-1017564 ] year out of range error
Brought to you by:
gustav_delius,
npstrick
From: SourceForge.net <no...@so...> - 2004-08-29 20:47:58
|
Bugs item #1017564, was opened at 2004-08-27 20:54 Message generated for change (Comment added) made by gregg0 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=439479&aid=1017564&group_id=44411 Category: None Group: None Status: Open Resolution: None Priority: 8 Submitted By: Gustav W Delius (gustav_delius) Assigned to: Greg Gamble (gregg0) Summary: year out of range error Initial Comment: When trying to create a new quiz I get an error "Year out of range (must be >= 2000): 1970". This is on a Windows 2000 machine. ---------------------------------------------------------------------- >Comment By: Greg Gamble (gregg0) Date: 2004-08-30 04:47 Message: Logged In: YES user_id=766524 I finally discovered how it was that I was not experiencing the error. Essentially, it came down to our lack of summer time. In filling in some of the entries the Date constructor uses a default time (0 as you observed, which translates to 1 January, 1970), so that the `Date/DaysSince1Jan2000` function I'd introduced needed to actually be `Date/DaysSince1Jan1970`. I've replaced the former function by the latter now, and that bug should be gone now. I'll do some more thorough testing tomorrow, but I'm confident everything is working properly now. Sorry, it was my goof after all. Regards, Greg ---------------------------------------------------------------------- Comment By: Gustav W Delius (gustav_delius) Date: 2004-08-28 19:46 Message: Logged In: YES user_id=737246 I found the bug: in the Date constructor the 'SetTimeZone' method is called before the 'Raw' field is set. The 'SetTimeZone' method therefore assumes that the raw time is 0, which leads to the "Year out of range" error. While I managed to find the bug I don't feel up to the task of fixing it properly. I'll leave that to Greg. ---------------------------------------------------------------------- Comment By: Greg Gamble (gregg0) Date: 2004-08-28 18:16 Message: Logged In: YES user_id=766524 `Date/CurrentRawDate`() is used. This calls an internal Maple function: iolib(25) which apparently (couldn't find any documentation) returns the number of seconds since 00:00:00, Jan 1, 1970 ... it agrees with the UNIX date +"%s" A moment ago this function gave: 1093688092 ... for me. Maybe you could check that your Maple responds with a similarly sized number when you give it: iolib(25); Regards, Greg ---------------------------------------------------------------------- Comment By: Gustav W Delius (gustav_delius) Date: 2004-08-28 02:25 Message: Logged In: YES user_id=737246 The date that Windows displays is the correct one. How does AiM get the date from my computer? ---------------------------------------------------------------------- Comment By: Greg Gamble (gregg0) Date: 2004-08-28 01:00 Message: Logged In: YES user_id=766524 This message is generated by `Date/DaysSince1Jan2000` in Date.mpl when called with a year < 2000. The only way I can see that the error message could be generated is if your computer's date was set to before the year 2000. Is that the case? ... maybe to avoid software license expiries or something. Regards, Greg ---------------------------------------------------------------------- Comment By: Gustav W Delius (gustav_delius) Date: 2004-08-27 21:44 Message: Logged In: YES user_id=737246 ..and by the way: I am using Maple 8 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=439479&aid=1017564&group_id=44411 |