CSV import: support min.sec format

Assume a format containing a dot to be min.sec as defined in DL7
specification.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2016-04-24 21:11:22 +03:00 committed by Dirk Hohndel
parent 1fec953a13
commit 0b8ac416bf

View file

@ -166,7 +166,15 @@
<xsl:call-template name="sec2time">
<xsl:with-param name="timeSec">
<xsl:value-of select="$value"/>
<xsl:choose>
<xsl:when test="substring-after($value, '.') != ''">
<!-- Well, I suppose it was min.sec -->
<xsl:value-of select="substring-before($value, '.') * 60 + substring-after($value, '.')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$value"/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</xsl:when>