shithub: scc

ref: 77f45146adc228d86119395efa68aa0fb1437191
dir: /src/libc/time/gentz.awk/

View raw version
BEGIN { print "#include \"../libc.h\"\nstruct tzone tzones[] = {" }
{
    split($2,a,":")
    min = a[1] * 60
    min = min + a[2]
    sec = min * 60
    printf "\t{\"%s\", %d},\n", $1, sec
}
END { print "\t{0,\t0}\n};\n" }