summaryrefslogtreecommitdiff
path: root/gdata/tests/youtube.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2014-08-09 21:10:03 +0100
committerPhilip Withnall <philip@tecnocode.co.uk>2014-08-09 21:28:28 +0100
commit18c16bfc9e517d44bf84449e58cc5b10bde07f09 (patch)
tree1c434bd182bee93e148f941ca5aabbf7539ca248 /gdata/tests/youtube.c
parent30546923f89ce2b95cb6f6e97bf59317e5f69fda (diff)
downloadlibgdata-18c16bfc9e517d44bf84449e58cc5b10bde07f09.tar.gz
core: Tweak generated ISO8601 dates to appease Google’s parsers
Even though the protocol documentation claims to accept RFC3339 dates, the servers have recently started rejecting dates formatted as ‘2014-08-09T21:10:05Z’ which don’t include microseconds and specify the timezone non-numerically. Since the issue hasn’t been resolved at Google’s end, we need to hack the date formats generated by libgdata to appease the servers, completely undermining the point of having a defined protocol and RFC to base the code on. Sigh. Change gdata_parser_int64_to_iso8601() to produce dates in the format ‘YYYY-MM-DDTHH:MM:SS.000001+00:00’. This was previously used by the JSON output generator, so perhaps the server breakage was introduced when Google started rolling out the JSON APIs. https://bugzilla.gnome.org/show_bug.cgi?id=732809
Diffstat (limited to 'gdata/tests/youtube.c')
-rw-r--r--gdata/tests/youtube.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdata/tests/youtube.c b/gdata/tests/youtube.c
index 1195bc3a..a1e070aa 100644
--- a/gdata/tests/youtube.c
+++ b/gdata/tests/youtube.c
@@ -967,8 +967,8 @@ test_parsing_yt_recorded (void)
"gd:etag='W/\"CEMFSX47eCp7ImA9WxVUGEw.\"'>"
"<title type='text'>Judas Priest - Painkiller</title>"
"<id>tag:youtube.com,2008:video:JAagedeKdcQ</id>"
- "<updated>2009-03-23T12:46:58Z</updated>"
- "<published>2006-05-16T14:06:37Z</published>"
+ "<updated>2009-03-23T12:46:58.000001+00:00</updated>"
+ "<published>2006-05-16T14:06:37.000001+00:00</published>"
"<category term='http://gdata.youtube.com/schemas/2007#video' scheme='http://schemas.google.com/g/2005#kind'/>"
"<link href='http://www.youtube.com/watch?v=JAagedeKdcQ' rel='http://www.iana.org/assignments/relation/alternate' type='text/html'/>"
"<link href='http://gdata.youtube.com/feeds/api/videos/JAagedeKdcQ?client=ytapi-google-jsdemo' rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/>"
@@ -1055,8 +1055,8 @@ test_parsing_yt_access_control (void)
"gd:etag='W/\"CEMFSX47eCp7ImA9WxVUGEw.\"'>"
"<title type='text'>Judas Priest - Painkiller</title>"
"<id>tag:youtube.com,2008:video:JAagedeKdcQ</id>"
- "<updated>2009-03-23T12:46:58Z</updated>"
- "<published>2006-05-16T14:06:37Z</published>"
+ "<updated>2009-03-23T12:46:58.000001+00:00</updated>"
+ "<published>2006-05-16T14:06:37.000001+00:00</published>"
"<category term='http://gdata.youtube.com/schemas/2007#video' scheme='http://schemas.google.com/g/2005#kind'/>"
"<link href='http://www.youtube.com/watch?v=JAagedeKdcQ' rel='http://www.iana.org/assignments/relation/alternate' type='text/html'/>"
"<link href='http://gdata.youtube.com/feeds/api/videos/JAagedeKdcQ?client=ytapi-google-jsdemo' rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/>"
@@ -1255,8 +1255,8 @@ test_parsing_georss_where (void)
"xmlns:gml='http://www.opengis.net/gml'>"
"<title type='text'>Some video somewhere</title>"
"<id>tag:youtube.com,2008:video:JAagedeKdcQ</id>"
- "<updated>2009-03-23T12:46:58Z</updated>"
- "<published>2006-05-16T14:06:37Z</published>"
+ "<updated>2009-03-23T12:46:58.000001+00:00</updated>"
+ "<published>2006-05-16T14:06:37.000001+00:00</published>"
"<category term='http://gdata.youtube.com/schemas/2007#video' scheme='http://schemas.google.com/g/2005#kind'/>"
"<link href='http://www.youtube.com/watch?v=JAagedeKdcQ' rel='http://www.iana.org/assignments/relation/alternate' type='text/html'/>"
"<link href='http://gdata.youtube.com/feeds/api/videos/JAagedeKdcQ?client=ytapi-google-jsdemo' rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/>"
@@ -1295,8 +1295,8 @@ test_parsing_georss_where (void)
"xmlns:gml='http://www.opengis.net/gml'>"
"<title type='text'>Some video somewhere</title>"
"<id>tag:youtube.com,2008:video:JAagedeKdcQ</id>"
- "<updated>2009-03-23T12:46:58Z</updated>"
- "<published>2006-05-16T14:06:37Z</published>"
+ "<updated>2009-03-23T12:46:58.000001+00:00</updated>"
+ "<published>2006-05-16T14:06:37.000001+00:00</published>"
"<category term='http://gdata.youtube.com/schemas/2007#video' scheme='http://schemas.google.com/g/2005#kind'/>"
"<link href='http://www.youtube.com/watch?v=JAagedeKdcQ' rel='http://www.iana.org/assignments/relation/alternate' type='text/html'/>"
"<link href='http://gdata.youtube.com/feeds/api/videos/JAagedeKdcQ?client=ytapi-google-jsdemo' rel='http://www.iana.org/assignments/relation/self' type='application/atom+xml'/>"