Package: gawk
Version: GNU Awk 3.1.4

The man page for the "mktime(datespec)" function in awk states:

"The datespec is a string of the form YYYY MM DD HH MM SS[ DST]... If the daylight saving flag is positive, the time is assumed to be daylight saving time; if zero, the time is assumed to be standard time; and if negative (the default), mktime() attempts to determine whether daylight saving time is in effect for the specified time."

The optional "DST" field appears to have no effect, and whether daylight saving time applies is always taken from the local timezone:

$ awk 'BEGIN{printf("%d\n", mktime("1970 01 01 00 00 00") )}{}' /dev/null
-3600
$ awk 'BEGIN{printf("%d\n", mktime("1970 01 01 00 00 00 0") )}{}' /dev/null
-3600
$ awk 'BEGIN{printf("%d\n", mktime("1970 01 01 00 00 00 1") )}{}' /dev/null
-3600
$ TZ=UTC awk 'BEGIN{printf("%d\n", mktime("1970 01 01 00 00 00 0") )}{}' 
/dev/null
0

$ date
Fri Apr 28 15:05:15 BST 2006

$ uname -a
Linux 2.6.13 #5 SMP Mon Sep 26 16:04:46 BST 2005 i686 GNU/Linux

$ dpkg -s libc6 | grep ^Version
Version: 2.3.2.ds1-22sarge3




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to