When creating a QDateTime object using ::fromString if the date is in the daylight saving time change the object may not be valid (as isValid() sees or toString() fails).
To better understand I made a small example also attached (x.cpp).
If this code is called with a TZ='Brazil/East' it will output:
If called with a TZ='GMT' it will output:
I don't know if this is expected behavior for this code, but it seems the QDateTime should generate a valid object since it didn't receive time values, only date (yyyy.MM.dd), also on both timezones the ms from epoch seems right.}}
I tested this on Ubuntu 18.04.1 LTS (Qt 5.9.5) and Gentoo (Qt 5.9.6).