From 2cb8ae96f06466165c3ddaf3ef5bff65cea47ffb Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 4 Aug 2016 07:33:14 +0000 Subject: [PATCH] Corrected weekday name in debug message of --modification-date. Thanks to Chris Lamb. --- xorriso/misc_funct.c | 6 ++++++ xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/xorriso/misc_funct.c b/xorriso/misc_funct.c index 6f743ddd..7859ff5a 100644 --- a/xorriso/misc_funct.c +++ b/xorriso/misc_funct.c @@ -463,6 +463,7 @@ int Decode_ecma119_format(struct tm *erg, char *text, int flag) /* 2010040711405800 */ { int i, l, num, utc= 1; + struct tm norm_tm; memset(erg, 0, sizeof(*erg)); erg->tm_isdst= -1; @@ -499,6 +500,11 @@ int Decode_ecma119_format(struct tm *erg, char *text, int flag) erg->tm_sec= 10*(text[12]-'0')+text[13]-'0'; if(erg->tm_sec > 59) return(0); + /* Let mktime(3) compute erg->tm_wday and erg->tm_yday */ + memcpy(&norm_tm, erg, sizeof(struct tm)); + mktime(&norm_tm); + erg->tm_wday= norm_tm.tm_wday; + erg->tm_yday= norm_tm.tm_yday; return(1 + !utc); } diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 7dc0cffb..18e2d042 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2016.07.31.073903" +#define Xorriso_timestamP "2016.08.04.073312"