Please note that DateTime::gettimestamp() will return an integer, but DateTime::format("U") will return a string.
timestamp must always be typed as int because in PHP, timestamps are integers.
eg:
- strftime ( string $format [, int $timestamp = time() ] ) : string
- time() // return int
- ...
So IMHO, as PHP becomes more and more a typed language, avoid using DateTime::format("U") to avoid this kind of errors "strftime() expects parameter 2 to be int, string given"