From 2c71d6063c8f53481374f89636686354a1c03bff Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 31 Aug 2021 19:16:27 -0400 Subject: datetime: Add UNIX-like date format --- diff --git a/README b/README index d79b7f3..77e0090 100644 --- a/README +++ b/README @@ -73,7 +73,7 @@ the following 43 formats: * Wed, Dec/31/1969 * Wed, Dec/31 -Additionally, the following eight date/time formats are supported: +Additionally, the following nine date/time formats are supported: * 1969-12-31T19:00:01 * 1969-12-31T19:00 @@ -83,6 +83,7 @@ Additionally, the following eight date/time formats are supported: * 19691231 190001 * 19691231 700 PM * 19691231 1900 + * Wed Dec 31 19:00:01 1969 Development ----------- diff --git a/src/datetime.c b/src/datetime.c index d1a720d..15a6b83 100644 --- a/src/datetime.c +++ b/src/datetime.c @@ -99,6 +99,8 @@ static const char *DATETIME_MISC_FMTS_[] = { " %Y%m%d %H%M%S ", " %Y%m%d %I%M %p ", " %Y%m%d %H%M ", + /* Wed Dec 31 19:00:01 1969 */ + " %a %b %d %H:%M:%S %Y ", NULL }; -- cgit v0.9.1