[PATCH] Count the actual decimal digits for import
Miika Turkia
miika.turkia at gmail.com
Tue Nov 27 08:14:15 PST 2012
Apply the decimal time conversion hack for JDiveLog import if there are
less than 2 digits in the decimal part (and value is less than 60).
Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
xslt/jdivelog2subsurface.xslt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xslt/jdivelog2subsurface.xslt b/xslt/jdivelog2subsurface.xslt
index d8a850b..8ba7de5 100644
--- a/xslt/jdivelog2subsurface.xslt
+++ b/xslt/jdivelog2subsurface.xslt
@@ -387,7 +387,7 @@ Comment: <xsl:value-of select="Comment"/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
- <xsl:when test="substring-after($timeSec, '.') >= 60 or substring-after($timeSec, '.') < 10">
+ <xsl:when test="substring-after($timeSec, '.') >= 60 or string-length(substring-after($timeSec, '.')) < 2">
<xsl:value-of select="concat(substring-before($timeSec, '.'), ':', format-number(round(substring-after(format-number($timeSec, '.00'), '.') * .6), '00'), ' min')"/>
</xsl:when>
<xsl:otherwise>
--
1.7.9.5
More information about the subsurface
mailing list