Allow %D and %T in date/time formats.

1) They're both required, for both strftime() and strptime(), by the
Single UNIX Specification.

2) They're both supported by MSVC's strftime(), at least as of VS 2015.

3) With MSVC, we use our own strptime(), which is based on the GNU libc
one and which supports both of them.

So we don't have to worry about them not working and either giving a
bogus value or throwing an exception or anything such as that.

Bug: 15565
Change-Id: I72b7798f35c4461855298cfcfa84732c1297d5fe
Reviewed-on: https://code.wireshark.org/review/32370
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2019-03-09 15:29:21 -08:00
parent e451ea0a4d
commit 4273d0b170
1 changed files with 1 additions and 1 deletions

View File

@ -355,7 +355,7 @@ void ImportTextDialog::on_encapComboBox_currentIndexChanged(int index)
bool ImportTextDialog::checkDateTimeFormat(const QString &time_format)
{
const QString valid_code = "aAbBcdHIjmMpSUwWxXyYzZ%";
const QString valid_code = "aAbBcdDHIjmMpSTUwWxXyYzZ%";
int idx = 0;
while ((idx = time_format.indexOf("%", idx)) != -1) {