~vcs-imports/gawk/master

« back to all changes in this revision

Viewing changes to awklib/eg/lib/ctime.awk

  • Committer: Juergen Kahrs
  • Date: 2014-06-24 11:18:33 UTC
  • mfrom: (408.2.336)
  • Revision ID: git-v1:f1245d04a9f076773c60499b468f44ed9c91b59b
Merge remote-tracking branch 'origin/master' into cmake

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
function ctime(ts,    format)
6
6
{
7
 
    format = "%a %b %e %H:%M:%S %Z %Y"
 
7
    format = PROCINFO["strftime"]
8
8
    if (ts == 0)
9
9
        ts = systime()       # use current time as default
10
10
    return strftime(format, ts)