Stricter DateTimeParser for known formats (fixes #569) (#4330)

* GH #569: Cherry pick and correct code from devel-experimental.

* GH #569: Add missing timezone codes.

* enh(Foundation): DateTimeParser: stricter checks of timezones, more tests for invalid inputs. (#569)

* enh(Foundation): Small fixes of issues detected by CodeQL

---------

Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
This commit is contained in:
Matej Kenda
2023-12-11 14:48:33 +01:00
committed by GitHub
parent 24b7122f43
commit 4f1cf68307
10 changed files with 339 additions and 61 deletions

View File

@@ -53,6 +53,8 @@ class Foundation_API DateTimeParser
/// If more strict format validation of date/time strings is required, a regular
/// expression could be used for initial validation, before passing the string
/// to DateTimeParser.
/// TODO: Correct description
{
public:
static void parse(const std::string& fmt, const std::string& str, DateTime& dateTime, int& timeZoneDifferential);