mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
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>
This commit is contained in:
parent
627067118c
commit
4a83541650
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user