From d6fea8a8e6cd1815f679c74037246942e861831e Mon Sep 17 00:00:00 2001 From: Rintaro Kuroiwa Date: Thu, 10 Sep 2015 11:53:53 -0700 Subject: [PATCH] Explicitly specify that availabilityStartTime is UTC - Adding a 'Z' at the end means it is in UTC time. Change-Id: I2e876c81449adcf3878e6d0d2b3c74f34edc8963 --- packager/mpd/base/mpd_builder.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packager/mpd/base/mpd_builder.cc b/packager/mpd/base/mpd_builder.cc index 7dc292aaff..ee46148d41 100644 --- a/packager/mpd/base/mpd_builder.cc +++ b/packager/mpd/base/mpd_builder.cc @@ -101,14 +101,15 @@ bool Positive(double d) { return d > 0.0; } -// Return current time in XML DateTime format. +// Return current time in XML DateTime format. The value is in UTC, so the +// string ends with a 'Z'. std::string XmlDateTimeNowWithOffset(int32_t offset_seconds) { base::Time time = base::Time::Now(); time += base::TimeDelta::FromSeconds(offset_seconds); base::Time::Exploded time_exploded; time.UTCExplode(&time_exploded); - return base::StringPrintf("%4d-%02d-%02dT%02d:%02d:%02d", time_exploded.year, + return base::StringPrintf("%4d-%02d-%02dT%02d:%02d:%02dZ", time_exploded.year, time_exploded.month, time_exploded.day_of_month, time_exploded.hour, time_exploded.minute, time_exploded.second);