From: hj kim Date: Tue, 10 Nov 2020 06:50:21 +0000 (+0900) Subject: when display time, Change "T" to Space and not append time zone to maintain compatibility X-Git-Tag: accepted/tizen/unified/20211213.133610~10 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fffmpeg.git;a=commitdiff_plain;h=aca5be90b4af5e130674f00550ab70b666dc7135 when display time, Change "T" to Space and not append time zone to maintain compatibility NOTE: ISO 8601 defines date and time separated by "T". Applications using this syntax may choose, for the sake of readability, to specify a full-date and full-time separated by (say) a space character. Change-Id: I30549ad4b59d8bbd354fd17723aaa58f33032817 --- diff --git a/libavutil/dict.c b/libavutil/dict.c index 9d3d96c..b9dbfb0 100644 --- a/libavutil/dict.c +++ b/libavutil/dict.c @@ -262,9 +262,15 @@ int avpriv_dict_set_timestamp(AVDictionary **dict, const char *key, int64_t time ptm = gmtime_r(&seconds, &tmbuf); if (ptm) { char buf[32]; +#ifdef __TIZEN__ + if (!strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", ptm)) + return AVERROR_EXTERNAL; +#else if (!strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S", ptm)) return AVERROR_EXTERNAL; av_strlcatf(buf, sizeof(buf), ".%06dZ", (int)(timestamp % 1000000)); +#endif + return av_dict_set(dict, key, buf, 0); } else { return AVERROR_EXTERNAL;