gawk and strftime()

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?

DST is not UTC. If you mean METDST. It is one hour fast - exactly what you see. Plus you realize those values are for Dec 31 1969 - Jan 1 1970.

Midnight UTC is 1:00am DST. 1:00am UTC is 2:00am DST. What you see is correct.
Most systems are supposed to support the TZ variable. Play around with that

export TZ=MET-1METDST
date
export TZ=MET0
date
export TZ=ZZZ-19
date

Your gawk code should follow suit nicely.

That was indeed the Time Zone that needed to be defined or canceled.

$ TZ=UTC awk 'BEGIN {print strftime("%T", 3600)}'
> 01:00:00

Thank you.