diff options
author | B. Stack <bgstack15@gmail.com> | 2025-01-20 19:25:18 -0500 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2025-01-20 19:25:18 -0500 |
commit | de65d3c0295894f8eafc4c7582dfe180dc58c81e (patch) | |
tree | 3ba8ec770b81468ca4ad83d985b991c5f669de22 /zen/time.h | |
parent | add upstream 13.9 (diff) | |
download | FreeFileSync-de65d3c0295894f8eafc4c7582dfe180dc58c81e.tar.gz FreeFileSync-de65d3c0295894f8eafc4c7582dfe180dc58c81e.tar.bz2 FreeFileSync-de65d3c0295894f8eafc4c7582dfe180dc58c81e.zip |
Diffstat (limited to 'zen/time.h')
-rw-r--r-- | zen/time.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -60,7 +60,7 @@ TimeComp parseTime(const String& format, const String2& str); //similar to ::str //---------------------------------------------------------------------------------------------------------------------------------- //format: [-][[d.]HH:]MM:SS e.g. -1.23:45:67 -Zstring formatTimeSpan(int64_t timeInSec, bool hourOptional = false); +Zstring formatTimeSpan(int64_t timeInSec, bool hourRequired = true); @@ -389,7 +389,7 @@ TimeComp parseTime(const String& format, const String2& str) inline -Zstring formatTimeSpan(int64_t timeInSec, bool hourOptional) +Zstring formatTimeSpan(int64_t timeInSec, bool hourRequired) { Zstring timespanStr; @@ -400,7 +400,7 @@ Zstring formatTimeSpan(int64_t timeInSec, bool hourOptional) } //check *before* subtracting days! - const Zchar* timeSpanFmt = hourOptional && timeInSec < 3600 ? Zstr("%M:%S") : formatIsoTimeTag; + const Zchar* timeSpanFmt = timeInSec < 3600 && !hourRequired ? Zstr("%M:%S") : formatIsoTimeTag; const int secsPerDay = 24 * 3600; const int64_t days = numeric::intDivFloor(timeInSec, secsPerDay); |