| Line | |
|---|
| 1 | # strftime.awk ; test the strftime code
|
|---|
| 2 | #
|
|---|
| 3 | # input is the output of `date', see Makefile.in
|
|---|
| 4 | #
|
|---|
| 5 | # The mucking about with $0 and $N is to avoid problems
|
|---|
| 6 | # on cygwin, where the timezone field is empty and there
|
|---|
| 7 | # are two consecutive blanks.
|
|---|
| 8 |
|
|---|
| 9 | # Additional mucking about to lop off the seconds field;
|
|---|
| 10 | # helps decrease chance of difference due to a second boundary
|
|---|
| 11 |
|
|---|
| 12 | {
|
|---|
| 13 | $3 = sprintf("%02d", $3 + 0)
|
|---|
| 14 | $4 = substr($4, 1, 5)
|
|---|
| 15 | print > "strftime.ok"
|
|---|
| 16 | $0 = strftime("%a %b %d %H:%M %Z %Y")
|
|---|
| 17 | $NF = $NF
|
|---|
| 18 | print > OUTPUT
|
|---|
| 19 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.