From b6a5098dd78431985ca50bb3b321fa0cf0ed1a98 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 28 Apr 2011 14:46:29 +0000 Subject: daylight savings info at boundary outputs diff --git a/src/file_list.c b/src/file_list.c index bced939..4d82db7 100644 --- a/src/file_list.c +++ b/src/file_list.c @@ -73,7 +73,7 @@ file_t* file_list_add(file_list_t* list, struct tm* time, const char* type, cons if(!tmp) return NULL; - log_printf(INFO, "%s time: %02d:%02d:%02d on %d.%d.%d", type, time->tm_hour, time->tm_min, time->tm_sec, time->tm_mday, time->tm_mon+1, time->tm_year+1900); + log_printf(INFO, "%s time: %02d:%02d:%02d on %d.%d.%d%s", type, time->tm_hour, time->tm_min, time->tm_sec, time->tm_mday, time->tm_mon+1, time->tm_year+1900, time->tm_isdst > 0 ? " (DST)": ""); char name[256]; strftime(name, sizeof(name), format, time); diff --git a/src/writer.c b/src/writer.c index 16fa23e..68f305c 100644 --- a/src/writer.c +++ b/src/writer.c @@ -151,7 +151,7 @@ static int check_boundaries(writer_t* writer) if(tmp >= boundary) { struct tm now_bd; localtime_r(&(now.tv_sec), &now_bd); - log_printf(INFO, "boundary reached! it's now: %02d:%02d:%02d.%06d on %d.%d.%d (%d ms offset)", now_bd.tm_hour, now_bd.tm_min, now_bd.tm_sec, now.tv_nsec/1000, now_bd.tm_mday, now_bd.tm_mon+1, now_bd.tm_year+1900, GST_TIME_AS_MSECONDS(writer->offset_)); + log_printf(INFO, "boundary reached! it's now: %02d:%02d:%02d.%06d on %d.%d.%d%s (%d ms offset)", now_bd.tm_hour, now_bd.tm_min, now_bd.tm_sec, now.tv_nsec/1000, now_bd.tm_mday, now_bd.tm_mon+1, now_bd.tm_year+1900, now_bd.tm_isdst > 0 ? " (DST)": "", GST_TIME_AS_MSECONDS(writer->offset_)); int ret = open_file(writer->next_); if(ret) return ret; // TODO: stop writer on open_file error ??? -- cgit v0.10.2