Files
Michael Pfeifroth 2d6925708e awk: fix mktime() for dates beyond 2038
do_mktime() returned the result of mktime() as int. Since int is
32 bits wide even on LP64 systems, any time at or after
2038-01-19 03:14:08 UTC was truncated, even with a 64-bit time_t:

  $ TZ=UTC busybox awk 'BEGIN { printf "%.0f\n", mktime("2038 01 19 03 14 08") }'
  -2147483648

Return time_t instead and add a testcase.

function                                             old     new   delta
exec_builtin                                        1130    1136      +6
do_mktime                                            119     121      +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 8/0)                 Total: 8 bytes

Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2026-11-06 15:33:22 +01:00
..
2026-11-06 15:33:22 +01:00
2026-07-03 08:14:23 +02:00
2023-07-10 17:25:21 +02:00
2007-11-13 17:13:31 +00:00
2026-10-12 12:34:42 +02:00