summaryrefslogtreecommitdiff
path: root/zen/time.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2025-01-20 19:25:18 -0500
committerB. Stack <bgstack15@gmail.com>2025-01-20 19:25:18 -0500
commitde65d3c0295894f8eafc4c7582dfe180dc58c81e (patch)
tree3ba8ec770b81468ca4ad83d985b991c5f669de22 /zen/time.h
parentadd upstream 13.9 (diff)
downloadFreeFileSync-de65d3c0295894f8eafc4c7582dfe180dc58c81e.tar.gz
FreeFileSync-de65d3c0295894f8eafc4c7582dfe180dc58c81e.tar.bz2
FreeFileSync-de65d3c0295894f8eafc4c7582dfe180dc58c81e.zip
add upstream 14.0, depends on wx 3.3.0HEAD14.0master
Diffstat (limited to 'zen/time.h')
-rw-r--r--zen/time.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/zen/time.h b/zen/time.h
index aa7df21b..11bfeb1a 100644
--- a/zen/time.h
+++ b/zen/time.h
@@ -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);
bgstack15