AWK Medium · Lesson 8

Dates and times: systime, mktime and strftime

Turn date strings into epoch seconds with mktime, format them with strftime, do day arithmetic in UTC, and normalise out-of-range fields.

Lessons · AWK Medium · Lesson 8 of 10

Dates and times: systime, mktime and strftime

Turn date strings into epoch seconds with mktime, format them with strftime, do day arithmetic in UTC, and normalise out-of-range fields.

Illustration for AWK
Turn date strings into epoch seconds with mktime, format them with strftime, do day arithmetic in UTC, and normalise out-of-range fields.