diff options
author | horchi <vdr@jwendel.de> | 2018-02-10 08:08:22 +0100 |
---|---|---|
committer | horchi <vdr@jwendel.de> | 2018-02-10 08:08:22 +0100 |
commit | 8e2744bd67e944ec68204b7999c905662b1c6bbd (patch) | |
tree | 114e3a5ba5658bce06f3883d95588fdfac45431a /lib | |
parent | 603be72552dec1465ae49fc392930a678f28bef1 (diff) | |
download | vdr-epg-daemon-8e2744bd67e944ec68204b7999c905662b1c6bbd.tar.gz vdr-epg-daemon-8e2744bd67e944ec68204b7999c905662b1c6bbd.tar.bz2 |
2018-02-10: version 1.1.131 (horchi)\n - added: Support delete for switch timer\n - added: Table for recording images (still under development)\n\n1.1.131
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common.c | 10 | ||||
-rw-r--r-- | lib/common.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/common.c b/lib/common.c index 9207083..cccf8fa 100644 --- a/lib/common.c +++ b/lib/common.c @@ -662,11 +662,11 @@ int l2hhmm(time_t t) // HHMM to Pretty Time //*************************************************************************** -std::string hhmm2pTime(int hhmm) +std::string hhmm2pTime(int hhmm, const char* delim) { char txt[100]; - sprintf(txt, "%02d:%02d", hhmm / 100, hhmm % 100); + sprintf(txt, "%02d%s%02d", hhmm / 100, delim, hhmm % 100); return std::string(txt); } @@ -882,7 +882,7 @@ int isLink(const char* path) if (lstat(path, &sb) == 0) return S_ISLNK(sb.st_mode); - tell(0, "Error: Detecting state for '%s' failed, error was '%s'", path, strerror(errno)); + tell(0, "Warning: Detecting file state for '%s' failed, error was '%s'", path, strerror(errno)); return false; } @@ -904,7 +904,7 @@ int fileSize(const char* path) if (lstat(path, &sb) == 0) return sb.st_size; - tell(0, "Error: Detecting state for '%s' failed, error was '%s'", path, strerror(errno)); + tell(0, "Warning: Detecting size for '%s' failed, error was '%s'", path, strerror(errno)); return 0; } @@ -916,7 +916,7 @@ time_t fileModTime(const char* path) if (lstat(path, &sb) == 0) return sb.st_mtime; - tell(0, "Error: Detecting state for '%s' failed, error was '%s'", path, strerror(errno)); + tell(0, "Warning: Detecting modification timer for '%s' failed, error was '%s'", path, strerror(errno)); return 0; } diff --git a/lib/common.h b/lib/common.h index b488783..0b9c284 100644 --- a/lib/common.h +++ b/lib/common.h @@ -290,7 +290,7 @@ int weekdayOf(time_t t); const char* toWeekdayName(uint day); time_t hhmmOf(time_t t); int l2hhmm(time_t t); -std::string hhmm2pTime(int hhmm); +std::string hhmm2pTime(int hhmm, const char* delim = ":"); time_t midnightOf(time_t t); std::string l2pTime(time_t t, const char* format = "%d.%m.%Y %T"); std::string l2pDate(time_t t); |