php simple current datetime with T and Z code example Example: datetime php $dateTime = new \DateTime(); $dateTime->format('Y-m-d H:i:s');