stealth@caen.engin.umich.edu (Mike Peltier) (01/22/90)
Why was the format of the date field in the history file changed to a non-human-readable format? I get the idea that it probably saves a bit of processor speed for the program, but it's kind of a pain to see a series of numbers when I want a quick and easy way to check the status of my newsfeed. Any other ways to do this? Thanks...
merlyn@iwarp.intel.com (Randal Schwartz) (01/24/90)
In article <4831b2fb.bfe8@tachyon.engin.umich.edu>, stealth@caen (Mike Peltier) writes: | Why was the format of the date field in the history file changed | to a non-human-readable format? I get the idea that it probably | saves a bit of processor speed for the program, but it's kind of | a pain to see a series of numbers when I want a quick and easy | way to check the status of my newsfeed. Any other ways to do | this? Thanks... Well, they're in Nearly-Human-Readable format in the 'log' file, which is where I'm checking on *my* newsfeeds. And, I like the idea that doing an expire doesn't have to parse that silly human-readable date 14 times over the two weeks that the article sits on my disk. Besides, doesn't *everyone* know that 633117016 is Tue Jan 23 09:50:16 1990 PST just by looking at it? :-) (I can write you a Perl program to translate it back, if you insist. :-) Just another Cnews-admin, -- /== Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ====\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!uunet!iwarp.intel.com!merlyn | \== Cute Quote: "Welcome to Oregon... Home of the California Raisins!" ==/
flee@shire.cs.psu.edu (Felix Lee) (01/24/90)
Randal Schwartz <merlyn@iwarp.intel.com> wrote:
> I can write you a Perl program to translate it back, if you insist.
Conversely, you can use
$NEWSBIN/getdate now 'now -1 day'
to find out that it's now 633139077, and yesterday was 633052677.
--
Felix Lee flee@shire.cs.psu.edu *!psuvax1!flee
tale@cs.rpi.edu (David C Lawrence) (01/24/90)
Randal Schwartz <merlyn@iwarp.intel.com> wrote: > I can write you a Perl program to translate it back, if you insist. Y'know, as soon as I saw RandalL's name on that article I knew he was going to offer a perl solution. In <C68n*p1@cs.psu.edu> flee@shire.cs.psu.edu (Felix Lee) writes: > Conversely, you can use > $NEWSBIN/getdate now 'now -1 day' > to find out that it's now 633139077, and yesterday was 633052677. Yes, you can. That isn't always completely helpful though. Sometime last month someone asked me when a group here was created. I think it was alt.folklore.computers. Well, active.times told me it was created at 628900369. Using the getdate approach I'd have to make a couple of guesses to narrow it down a little and even then I'd have to spend some extra time if I wanted to make it really accurate. So I just threw this trivial excuse for a programme in $NEWSBIN/maint/undate and have found it handy when looking at a couple of times stored by C News. Error is checking is non-existent -- non-numeric arguments all just get turned into 0 by atol() and give you back the beginning of the Unix epoch. I don't really care; works just fine for my needs. -- #include <stdio.h> #include <time.h> int main (argc, argv) int argc; char **argv; { extern long atol(); long clock; if (!--argc) { (void)fprintf(stderr,"Usage: %s seconds_since_unix_epoch [...]\n",argv[0]); exit(1); } while (argc--) { clock = atol(*++argv); (void)fputs(ctime(&clock), stdout); } exit(0); }
tale@cs.rpi.edu (David C Lawrence) (01/24/90)
In <XJWGA+@rpi.edu> I offered a really dinky programme which all in all was even dumber than I thought. Geoff Collyer has just pointed out to me what an idiot I am (well, he was nicer than that) because "ctime" already exists in $NEWSBIN/maint. Duh. His even rejects bogus options, though the message seems a little off. It basically does the same thing as what I posted. I'll just use that now. Dave -- (setq mail '("tale@cs.rpi.edu" "tale@ai.mit.edu" "tale@rpitsmts.bitnet"))
jwc@unify.uucp (J. William Claypool) (01/25/90)
In article <XJWGA+@rpi.edu> tale@cs.rpi.edu (David C Lawrence) writes: >Randal Schwartz <merlyn@iwarp.intel.com> wrote: >> I can write you a Perl program to translate it back, if you insist. > >Y'know, as soon as I saw RandalL's name on that article I knew he was >going to offer a perl solution. > >In <C68n*p1@cs.psu.edu> flee@shire.cs.psu.edu (Felix Lee) writes: >> Conversely, you can use >> $NEWSBIN/getdate now 'now -1 day' >> to find out that it's now 633139077, and yesterday was 633052677. > >Yes, you can. That isn't always completely helpful though. Sometime >last month someone asked me when a group here was created. I think it >was alt.folklore.computers. Well, active.times told me it was created >at 628900369. Using the getdate approach I'd have to make a couple of >guesses to narrow it down a little and even then I'd have to spend >some extra time if I wanted to make it really accurate. So I just >threw this trivial excuse for a programme in $NEWSBIN/maint/undate >and have found it handy when looking at a couple of times stored by C >News. What's wrong with $NEWSBIN/ctime? -- Bill Claypool +1 916 920 9092 | I know what I know if you know what I mean jwc@unify.UUCP |-------------------------------------------- ...!{csusac,pyramid}!unify!jwc | SCCA SFR Solo II 74 es 1984 CRX 1.5