shithub: scc

ref: 5cee3c5e3fdc511a468879104c08a1aa0e8c2b0f
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" }