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 u.h
#include libc.h
static char *awday[7] = { Sun, Mon, Tue, Wed, Thu, Fri, Sat };
static
Steve Simon st...@quintile.net 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
On Tuesday 02 September 2014 02:46:12 arn...@skeeve.com wrote:
Steve Simon st...@quintile.net 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
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 would do
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
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
seconds(1)
Marvelous, on two levels:
that it exists and I can use it.
that it diodn't imagine it
Thanks Kurt.
-Steve
On Tue, 02 Sep 2014 15:10:56 EDT erik quanstrom quans...@quanstro.net 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
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)
if err
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
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 skip.tavakkol...@gmail.com
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 we're talking past each other, or making different points.
but either way, i
On Tue, 02 Sep 2014 19:00:56 EDT erik quanstrom quans...@quanstro.net 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
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
The wikipedia entry on leap second is quite instructive.
It is now.
sl
Hi,
Where is /env timezone set from the contents of /adm/timezone/local?
./cmd/init.c:58:cpenv(/adm/timezone/local, #e/timezone);
- erik
16 matches
Mail list logo