ubuntu-buildroot/output/build/host-gawk-5.2.0/awklib/eg/lib/ctime.awk

13 lines
234 B
Awk
Raw Normal View History

2024-04-01 15:19:46 +00:00
# ctime.awk
#
# awk version of C ctime(3) function
function ctime(ts, format)
{
format = "%a %b %e %H:%M:%S %Z %Y"
if (ts == 0)
ts = systime() # use current time as default
return strftime(format, ts)
}