const char *host;
off_t fsize;
time_t durration;
+ struct tm tm;
int bandwidth;
hq = &hc->hc_reply;
durration = de->de_stop - de->de_start;
durration += (de->de_stop_extra + de->de_start_extra)*60;
bandwidth = ((8*fsize) / (durration*1024.0));
- strftime(buf, sizeof(buf), "%FT%T%z", localtime(&(de->de_start)));
+ strftime(buf, sizeof(buf), "%FT%T%z", localtime_r(&(de->de_start), &tm));
htsbuf_qprintf(hq, "#EXTINF:%"PRItime_t",%s\n", durration, lang_str_get(de->de_title, NULL));
time_t durration = 0;
off_t fsize = 0;
int bandwidth = 0;
+ struct tm tm;
const char *host = http_arg_get(&hc->hc_args, "Host");
durration = de->de_stop - de->de_start;
if(fsize) {
bandwidth = ((8*fsize) / (durration*1024.0));
- strftime(buf, sizeof(buf), "%FT%T%z", localtime(&(de->de_start)));
+ strftime(buf, sizeof(buf), "%FT%T%z", localtime_r(&(de->de_start), &tm));
htsbuf_qprintf(hq, "#EXTM3U\n");
htsbuf_qprintf(hq, "#EXTINF:%"PRItime_t",%s\n", durration, lang_str_get(de->de_title, NULL));