Re: [9fans] silly question

2014-09-02 Thread sl
> The wikipedia entry on leap second is quite instructive. It is now. sl

Re: [9fans] silly question

2014-09-02 Thread Bakul Shah
On Tue, 02 Sep 2014 19:19:59 EDT erik quanstrom wrote: > > I was mistaken. Turns out neither do Unix systems handle > > leapseconds. Now if only ITU punts on leapseconds in 2015, we > > can let some future generation worry about leap minutes or > > hours! Sorry for the noise. > > or we can give

Re: [9fans] silly question

2014-09-02 Thread erik quanstrom
> I was mistaken. Turns out neither do Unix systems handle > leapseconds. Now if only ITU punts on leapseconds in 2015, we > can let some future generation worry about leap minutes or > hours! Sorry for the noise. or we can give up on noon being a particular solar time. this would free us from t

Re: [9fans] silly question

2014-09-02 Thread Bakul Shah
On Tue, 02 Sep 2014 19:00:56 EDT erik quanstrom wrote: > > > correct. plan 9 does not bother with leap seconds. > > > > seconds(1) "handles" leap seconds in that it will not crash > > when it encounters them -- it accepts that sometimes there > > are 61 seconds in a minute. > > i'm not sure if

Re: [9fans] silly question

2014-09-02 Thread erik quanstrom
> > correct. plan 9 does not bother with leap seconds. > > seconds(1) "handles" leap seconds in that it will not crash > when it encounters them -- it accepts that sometimes there > are 61 seconds in a minute. i'm not sure if we're talking past each other, or making different points. but either

Re: [9fans] silly question

2014-09-02 Thread Kurt H Maier
Quoting erik quanstrom : correct. plan 9 does not bother with leap seconds. seconds(1) "handles" leap seconds in that it will not crash when it encounters them -- it accepts that sometimes there are 61 seconds in a minute. khm

Re: [9fans] silly question

2014-09-02 Thread Skip Tavakkolian
not strange; misunderstood :) On Tue, Sep 2, 2014 at 2:27 PM, Bakul Shah wrote: > Skip, You have a very strange sense of humour. > > At the first stroke it will be ten thrree & 40 seconds. > At the first stroke it will be ten thrree & 50 seconds. > At the first stroke it will be ten four. Precise

Re: [9fans] silly question

2014-09-02 Thread Bakul Shah
Skip, You have a very strange sense of humour. At the first stroke it will be ten thrree & 40 seconds. At the first stroke it will be ten thrree & 50 seconds. At the first stroke it will be ten four. Precisely. On Tue, 02 Sep 2014 14:10:57 PDT Skip Tavakkolian wrote: > inspired me to write dis

Re: [9fans] silly question

2014-09-02 Thread Steve Simon
> to make a hammertime (http://en.wikipedia.org/wiki/U_Can't_Touch_This) > you can subtract 1990 from parsed date instead. Oh no. Thats going to be stuck in my head for hours now ☺ -Steve

Re: [9fans] silly question

2014-09-02 Thread Skip Tavakkolian
inspired me to write discotime: % cat discotime.go // print the number of seconds from the dawn of Disco until the date in the argument package main import ( "fmt" "os" "time" ) func main() { for _, s := range os.Args[1:] { d, err := time.Parse(time.UnixDate, s) i

Re: [9fans] silly question

2014-09-02 Thread erik quanstrom
> plan9 doesn't deal with leap seconds, right? There've been 35 > leap seconds since 1972 (International Atomic Time is 35 > seconds ahead of GMT). Though this probably doesn't matter > for timestamps in log files. correct. plan 9 does not bother with leap seconds. - erik

Re: [9fans] silly question

2014-09-02 Thread Bakul Shah
On Tue, 02 Sep 2014 15:10:56 EDT erik quanstrom wrote: > > Strftime is a red herring (sorry), I can use and "date" | getline > > to generate pretty much any date string I need. > > > > The issue is more going the other way. tm2sec in awk is quite complex > > and hids many pitfalls if you want t

Re: [9fans] silly question

2014-09-02 Thread Steve Simon
> seconds(1) Marvelous, on two levels: that it exists and I can use it. that it diodn't imagine it Thanks Kurt. -Steve

Re: [9fans] silly question

2014-09-02 Thread erik quanstrom
> Strftime is a red herring (sorry), I can use and "date" | getline > to generate pretty much any date string I need. > > The issue is more going the other way. tm2sec in awk is quite complex > and hids many pitfalls if you want to do it correctly. > > My problem is parsing logfiles which conta

Re: [9fans] silly question

2014-09-02 Thread Kurt H Maier
Quoting Steve Simon : plan9 has date(1) but there is no tm2sec(1), unless it is called somthing I didn't expect. seconds(1) khm

Re: [9fans] silly question

2014-09-02 Thread Steve Simon
> i'm not sure what your particular problem domain is since you don't say True. Strftime is a red herring (sorry), I can use and "date" | getline to generate pretty much any date string I need. The issue is more going the other way. tm2sec in awk is quite complex and hids many pitfalls if you

Re: [9fans] silly question

2014-09-02 Thread erik quanstrom
On Tue Sep 2 03:07:56 EDT 2014, st...@quintile.net wrote: > I want to process some dated logfiles in awk. > > gawk has date, strftime and mktime but Brian's does not. i'm not sure what your particular problem domain is since you don't say, but i've always just used the standard awk functions t

Re: [9fans] silly question

2014-09-02 Thread arnold
"Steve Simon" wrote: > > I'd be happy to know the results of attempting a gawk port via APE. :-) > > Not sure Al, Peter, or Brian would forgive me :-) > Though if memory serves it has been done already. > > -Steve Brian is a good friend of mine. He (at least) wouldn't mind. :-) Arnold

Re: [9fans] silly question

2014-09-02 Thread Steve Simon
> I'd be happy to know the results of attempting a gawk port via APE. :-) Not sure Al, Peter, or Brian would forgive me :-) Though if memory serves it has been done already. -Steve

Re: [9fans] silly question

2014-09-02 Thread arnold
> > I'd be happy to know the results of attempting a gawk port via APE. :-) > > There is one > > http://ports2plan9.googlecode.com/files/gawk-4.0.0b.pkg.tbz > > or > /n/sources/contrib/staal1978/pkg/gawk-4.0.0b.pkg.tbz 4.0.0 is around 3 years old. Current version is 4.1.1. Although this one wo

Re: [9fans] silly question

2014-09-02 Thread Jens Staal
On Tuesday 02 September 2014 02:46:12 arn...@skeeve.com wrote: > "Steve Simon" wrote: > > I want to process some dated logfiles in awk. > > > > gawk has date, strftime and mktime but Brian's does not. > > > > plan9 has date(1) but there is no tm2sec(1), unless it > > is called somthing I didn't

Re: [9fans] silly question

2014-09-02 Thread arnold
"Steve Simon" wrote: > I want to process some dated logfiles in awk. > > gawk has date, strftime and mktime but Brian's does not. > > plan9 has date(1) but there is no tm2sec(1), unless it > is called somthing I didn't expect. > > Anyone found somting I could not in the plan9 distribution? > > -S

Re: [9fans] silly question

2014-09-02 Thread lucio
> gawk has date, strftime and mktime but Brian's does not. I hacked a version of strftime() for my own use, I don't know if it helps. It may not be the very latest version, I keep messing with it: #include #include static char *awday[7] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; s

[9fans] silly question

2014-09-02 Thread Steve Simon
I want to process some dated logfiles in awk. gawk has date, strftime and mktime but Brian's does not. plan9 has date(1) but there is no tm2sec(1), unless it is called somthing I didn't expect. Anyone found somting I could not in the plan9 distribution? -Steve

Re: [9fans] silly question - timezone

2011-01-20 Thread erik quanstrom
> Hi, > > Where is /env timezone set from the contents of /adm/timezone/local? ./cmd/init.c:58:cpenv("/adm/timezone/local", "#e/timezone"); - erik

[9fans] silly question - timezone

2011-01-20 Thread Steve Simon
Hi, Where is /env timezone set from the contents of /adm/timezone/local? I have looked where I expect it it be (cpurc, termrc, profile) but cannot find it, I also grepped in the kernel source and found nothing. how does it happen? -Steve