Strange behaviour of the strftime() function from gawk (3.1.5):
$ awk 'BEGIN{print strftime("%T", 3600)}'
> 02:00:00
$ awk 'BEGIN{print strftime("%T", 0)}'
> 01:00:00
Obviously something with DST but I can not figure out why? To me 3600 epoch seconds remains 01:00, DST or not.
From the gawk man pages:
strftime([format [, timestamp]])
Formats timestamp according to the specification in format. The timestamp should be of the same form
as returned by systime(). If timestamp is missing, the current time of day is used. If format is
missing, a default format equivalent to the output of date(1) is used. See the specification for the
strftime() function in ANSI C for the format conversions that are guaranteed to be available. A pub
lic-domain version of strftime(3) and a man page for it come with gawk; if that version was used to
build gawk, then all of the conversions described in that man page are available to gawk.
Any idea?