Format should be a bit different:
$format = '%Y-%m-%d %H:%M:%S'; // or just '%F %T'
Here's the corresponding section of strftime
format documentation:
%M Two digit representation of the minute [00 through 59]
%S Two digit representation of the second [00 through 59]
%T Same as "%H:%M:%S"
%F Same as "%Y-%m-%d" (commonly used in database datestamps)