aboutsummaryrefslogtreecommitdiffstats
path: root/xslt/commonTemplates.xsl
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2013-10-16 21:20:26 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-16 11:52:05 -0700
commit80bced4f560047874515536979e3cba1e519e147 (patch)
tree4680f16464b71d9e2eb7219e4759b80db0cb90ce /xslt/commonTemplates.xsl
parent4f23ff144ffe962349b3c155690991525a399260 (diff)
downloadsubsurface-80bced4f560047874515536979e3cba1e519e147.tar.gz
Rounding error on time change
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@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/commonTemplates.xsl')
-rw-r--r--xslt/commonTemplates.xsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/xslt/commonTemplates.xsl b/xslt/commonTemplates.xsl
index 955cf8250..5c3da408b 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