Use platform specific datetime format for assertions in WriteTest

The `WriteTest` is not aware of the platform specific DATETIME format when asserting fetched results. This can lead to problems on platforms that have a different default DATETIME format than `Y-m-d` and leads to failures.
This PR fixes this issue.