TypeError thrown

date(): Argument #2 ($timestamp) must be of type ?int, DateTime given