home *** CD-ROM | disk | FTP | other *** search
-
- We've been using Steve Bellovin's getdate() routine in the Cronus project
- for over a year. This past summer Jim Berets and I cleaned up all the
- timezones, cleaned up some int/long problems that others have found,
- reformatted the code and cleaned it up, and contacted Steve about what
- should else needs to be done with it.
-
- Unfortunately, we didn't have the time to do anything much with Steve's
- comments, other then document them in the code, and here (thanks to Steve
- for letting me quote some email):
- Two things need to be done. First, the purpose of getdate should be
- defined; many of its features were for a rather different purpose that
- it's used for today. Specifically, I was implementing 'at' before
- there was such a thing, and I wanted the ability to specify relative
- intervals. Thus, getdate accepts things like 'two weeks'. I don't
- think that code is tremendously useful. If it is, it could be
- strengthened by writing a better grammar, i.e., ``two weeks after
- monday'' -- currently, the word ``after'' isn't accept, and the
- relationship between the day of the week and the interval is
- peculiar. And that in turn goes back to the central implementation
- failure: it is restricted to a simple 'int' stack, because that's all
- that v6 yacc allowed. There's also a lot of reliance on global
- variables, for the same reason. Using a union as the stack type, one
- could store much better information, clean up the code, and make the
- semantics much clearer. (As a trivial change, I suspect that the
- military time zones are wrong, as I took them from RFC822 (or maybe
- even 733), and I've since learned that those are incorrect. I'd drop
- that entirely.) It might also be worth some effort to make the time
- zone stuff more compatible with the 4.3tahoe and the SysVR3.2 stuff,
- especially as regards the names of the zones.
-
- It was also intended to let utter novices set the date on a UNIX
- machine after rebooting it and thus it accepted almost any rational
- form.
-
- Hope you find this useful.
- /rich $alz
-