Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 exptools 1/6/84; site ihlts.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!ihlts!rjnoe From: rjnoe@ihlts.UUCP (Roger Noe) Newsgroups: net.startrek Subject: Source code for stardate program Message-ID: <511@ihlts.UUCP> Date: Wed, 11-Jul-84 17:40:53 EDT Article-I.D.: ihlts.511 Posted: Wed Jul 11 17:40:53 1984 Date-Received: Thu, 12-Jul-84 04:49:31 EDT Organization: AT&T Bell Labs, Naperville, IL Lines: 38 Some fellow readers of net.startrek have pretended to be interested in the stardate program I sometimes use for my Star Trek correspondence. While I know this is of limited value, I decided to post it anyway. The C source follows . . . --- /* Number of seconds from */ #define EPOCH 104538600 /* 20:30:00 EST, Thu. September 8, 1966 */ /* to the UNIX epoch of 00:00:00 GMT, */ /* January 1, 1970. */ main() { double stardate; stardate = (time((long *) 0) + EPOCH) / 86400.0; printf("%.5f\n", stardate); } --- Simple, huh? Basically all it does is measure the mean solar days from the moment the first episode of Star Trek began airing on network TV and calls them stardates. The inverse (I call the above program sd and its reverse unsd) is also easy to do. I know there are a lot of algorithms which might be arguably 'better' but I feel the above makes for a useful frame of reference for Star Trek fan activities. For example, the release stardates of the three Star Trek movies are (approx.) 4838 (ST1: 12-7-79), 5748 (ST2: 6-4-82) and 6476 (ST3: 6-1-84). An interval of 0.00001 stardate is slightly less than a (mean solar) second. Sure, we could get something a bit more meaningful by switching to sidereal time and so forth, but this algorithm seems good from the standpoint of simplicity and utility. It's a lot better than calling today's stardate something like 8407.11, like they do on those calendars. Oh, I almost forgot to mention: stardate 10000 is coming on January 24, 1994 so I'm planning to have a big party then. You're all invited. Watch this newsgroup for details. I'll get around to posting them about December, 1993 when "Star Trek VIII: The Destruction of the Federation" is released. (Star Trek IX tells how Kirk single-handedly raises everyone from the dead and then dies himself--of old age.) -- "The more they overthink the plumbin', the easier 'tis to stop up the drain." Roger Noe ihnp4!ihlts!rjnoe