CSV import: add min:sec format support

On CSV import the time can be represented with seconds, min:sec or
hour:min:sec. This patch adds support for the min:sec format that was
missing.

See #662

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2014-07-28 08:18:39 +03:00 committed by Dirk Hohndel
parent 0b5fe99353
commit 28bd1fdcb5

View file

@ -105,6 +105,11 @@
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:when test="substring-after(substring-after($value, ':'), ':') = ''">
<!-- We assume time format m:s -->
<xsl:value-of select="substring-before($value, ':') * 60 + substring-after($value, ':')" />
</xsl:when>
<xsl:otherwise>
<!-- We assume time format h:m:s -->