diff options
author | Martin Storsjö <martin@martin.st> | 2011-11-07 23:32:21 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2011-11-16 11:22:42 +0200 |
commit | 4a835416508820de383cda8cc906b6f1bd938889 (patch) | |
tree | 449d2cffb4992d12a14198f4855cdda1fb67882e /libavformat | |
parent | 627067118c6674dd944df962d24cf386afcd4326 (diff) | |
download | ffmpeg-4a835416508820de383cda8cc906b6f1bd938889.tar.gz |
avformat: Interpret times in ff_iso8601_to_unix_time as UTC
This function is used in muxers for parsing the 'creation_time'
metadata key, for converting it to a time value.
This makes it match the behaviour of the exported 'creation_time'
metadata from demuxers, where it is in UTC, too.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 11cb4f8b8e..dfcac203db 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -32,6 +32,7 @@ #include "id3v2.h" #include "libavutil/avstring.h" #include "libavutil/mathematics.h" +#include "libavutil/parseutils.h" #include "riff.h" #include "audiointerleave.h" #include "url.h" @@ -3944,7 +3945,7 @@ int64_t ff_iso8601_to_unix_time(const char *datestr) #if HAVE_STRPTIME struct tm time = {0}; strptime(datestr, "%Y - %m - %dT%T", &time); - return mktime(&time); + return av_timegm(&time); #else av_log(NULL, AV_LOG_WARNING, "strptime() unavailable on this system, cannot convert " "the date string.\n"); |