Skip to content

Instantly share code, notes, and snippets.

@benzittlau
Last active December 11, 2015 16:39
Show Gist options
  • Save benzittlau/4629505 to your computer and use it in GitHub Desktop.
Save benzittlau/4629505 to your computer and use it in GitHub Desktop.
PHP Output: 2013-01-24T16:13:08-07:00
Standards Example: 1996-12-19T16:39:57-08:00
PHP Output: 2013-01-24T16:13:08-07:00
Google's Output: 2013-01-24T23:00:04.000Z
{
"error": {
"errors": [
{
"domain": "global",
"reason": "badRequest",
"message": "Bad Request"
}
],
"code": 400,
"message": "Bad Request"
}
}
{
"title": "modified_time_test.txt",
"mimeType": "text/plain",
"modifiedDate": "2013-01-24T23:00:04.000Z",
"md5Checksum": "3de8f8b0dc94b8c2230fab9ec0ba0506",
"fileSize": "20"
}
<?php
echo date(DateTime::RFC3339, time()); #2013-01-24T16:13:08-07:00
<?php
echo date('Y-m-d\TH:i:s.000P', time()); #2013-01-24T16:58:25.000-07:00
<?php
'modifiedDate' => date(DateTime::RFC3339, $timestamp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment