The good news is that PHP provides the function strtotime() to convert date strings to timestamp integers. date() can then accept that integer as its optional second parameter.
The bad news is that strtotime() doesn't understand the format of "YYYYMMDDHHMMSS.0Z".
The good news is that through the judicious insertion of dashes, spaces and colons, the string can be converted into something strtotime() understands: "YYYY-MM-DD HH:MM:SS"
One way to add the dashes is through a regular expression. There are certainly others:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.