[PATCH] Rounding error on time change
Miika Turkia
miika.turkia at gmail.com
Wed Oct 16 11:20:26 UTC 2013
When we convert time in seconds to mm:ss format, we do not want to round
but get floor instead.
Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
xslt/commonTemplates.xsl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xslt/commonTemplates.xsl b/xslt/commonTemplates.xsl
index 955cf82..5c3da40 100644
--- a/xslt/commonTemplates.xsl
+++ b/xslt/commonTemplates.xsl
@@ -107,7 +107,7 @@
<xsl:template name="sec2time">
<xsl:param name="timeSec"/>
- <xsl:value-of select="concat(round($timeSec div 60), ':', format-number($timeSec mod 60, '00'))"/>
+ <xsl:value-of select="concat(floor($timeSec div 60), ':', format-number($timeSec mod 60, '00'))"/>
</xsl:template>
<!-- Calculate sum of all parameters, and strip any unit following the
--
1.8.1.2
More information about the subsurface
mailing list