Re: [BUG] ?? with time command ??

From: George (greerga@CIRCLEMUD.ORG)
Date: 10/19/98


On Fri, 16 Oct 1998, Jason Davidson wrote:

>I haven't sufficiently tested this on a stock version of the mud (3.0pl14), however I do notice that
>if the mud is running as the month turns over to a new month, it adds a day that is out of range.
>i.e. 36th Day of Month 1

Funny, another_hour():

    if (time_info.day > 34) {
      time_info.day = 0;
      time_info.month++;

      if (time_info.month > 16) {
        time_info.month = 0;
        time_info.year++;
      }
    }

>If that day goes to completion, the next day would be 2nd Day of Month 2...
>If I reboot the mud DURING the 36th day, and type time, I get the proper result, being:
>1st Day of Month 2...

Sounds like all you. ;)

>Now I've changed my calender and changed the value for beginning of time,
>but I'm sure that that has nothing to do with what I'm seeing.  I've
>adjusted all the mud_time values appropriately, and the constant arrays
>for month and week.  Has anyone else encountered this problem???

Did you remember to change act.informative.c: do_time()?

  /* 35 days in a month */
  weekday = ((35 * time_info.month) + time_info.day + 1) % 7;

--
George Greer, greerga@circlemud.org | Genius may have its limitations, but
http://mouse.van.ml.org/   (mostly) | stupidity is not thus handicapped.
http://www.van.ml.org/CircleMUD/    |                  -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST