diff --git a/winsup/cygwin/libc/strptime.cc b/winsup/cygwin/libc/strptime.cc index 3a9bdbb300d4..901e93607960 100644 --- a/winsup/cygwin/libc/strptime.cc +++ b/winsup/cygwin/libc/strptime.cc @@ -440,6 +440,12 @@ literal: LEGAL_ALT(0); goto recurse; + case 'v': /* OSX/Ruby VMS/Oracle date "%d-%b-%Y". */ + new_fmt = "%d-%b-%Y"; + LEGAL_ALT(0); + ymd |= SET_YMD; + goto recurse; + case 'X': /* The time, using the locale's format. */ new_fmt = (alt_format & ALT_E) ? _ctloc (era_t_fmt) : _ctloc(X_fmt); @@ -570,6 +576,14 @@ literal: LEGAL_ALT(0); continue; + case 'q': /* The quarter year. GNU extension. */ + LEGAL_ALT(0); + i = 1; + bp = conv_num(bp, &i, 1, 4, ALT_DIGITS); + tm->tm_mon = (i - 1)*3; + ymd |= SET_MON; + continue; + case 'S': /* The seconds. */ LEGAL_ALT(ALT_O); bp = conv_num(bp, &tm->tm_sec, 0, 61, ALT_DIGITS); @@ -655,7 +669,10 @@ literal: got_eoff = 0; continue; - case 'y': /* The year within 100 years of the epoch. */ + case 'i': /* The year within 100 years of the era. */ + LEGAL_ALT(0); + fallthrough; + case 'y': /* The year within 100 years of the era. */ /* LEGAL_ALT(ALT_E | ALT_O); */ ymd |= SET_YEAR; if ((alt_format & ALT_E) && *era_info)