summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Schubert <ischluff@mailbox.org>2017-01-27 00:25:07 +0100
committerMartin Storsjö <martin@martin.st>2017-01-27 14:07:30 +0200
commit1ae6cb7d6e4fee30754a46bc91f40ff75ac4412a (patch)
tree4d137679580c5fd6cabe501ff9358dcac1f88907
parent2bbb5abd877104fa9bc342c521bb49bc1aad50ce (diff)
dashenc: fix ISO8601 UTC parsing
Appends Z to timestamp to force ISO8601 datetime parsing as UTC. Without Z, some browsers (Chrome) interpret the timestamp as localtime and others (Firefox) interpret it as UTC. Signed-off-by: Anton Schubert <ischluff@mailbox.org> Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavformat/dashenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index ce018602dd..2b27950262 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -429,7 +429,7 @@ static void format_date_now(char *buf, int size)
struct tm *ptm, tmbuf;
ptm = gmtime_r(&t, &tmbuf);
if (ptm) {
- if (!strftime(buf, size, "%Y-%m-%dT%H:%M:%S", ptm))
+ if (!strftime(buf, size, "%Y-%m-%dT%H:%M:%SZ", ptm))
buf[0] = '\0';
}
}