summaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2016-11-10 06:47:44 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-11-15 03:23:51 -0800
commit821e35d2bb9a94798dceb5fa609eafba8d54776b (patch)
treefc5ac3c4fd14339dc44b0458ecaa696ea37e0652 /xslt
parentac800e14dd46fdea49aa1254b055757b27537105 (diff)
downloadsubsurface-821e35d2bb9a94798dceb5fa609eafba8d54776b.tar.gz
Fix time fraction calculation for CSV import
Previous formula didn't handle values of less than 10 correctly. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/csv2xml.xslt4
1 files changed, 2 insertions, 2 deletions
diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt
index e535aa87d..99474b079 100644
--- a/xslt/csv2xml.xslt
+++ b/xslt/csv2xml.xslt
@@ -233,10 +233,10 @@
<xsl:choose>
<xsl:when test="substring-after($value, '.') != ''">
<!-- Well, I suppose it was min.sec -->
- <xsl:value-of select="substring-before($value, '.') * 60 + substring(substring-after($value, '.') * 60, 1, 2)" />
+ <xsl:value-of select="substring-before($value, '.') * 60 + concat('.', substring-after($value, '.')) * 60" />
</xsl:when>
<xsl:when test="substring-after($value, ',') != ''">
- <xsl:value-of select="substring-before($value, ',') * 60 + substring(substring-after($value, ',') * 60, 1, 2)" />
+ <xsl:value-of select="substring-before($value, ',') * 60 + concat('.', substring-after($value, ',')) * 60" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$value"/>