Commit f1cdb291 authored by Seblu's avatar Seblu
Browse files

make date/time tagdisplay convertion only if decimal

parent 69bfc344
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -149,15 +149,21 @@ class TagDisplay(object):

    def type_date(self, value):
        '''date type'''
        if value.isdecimal():
            d = datetime.datetime.fromtimestamp(float(value))
            return d.strftime("%d/%m/%Y")
        return value

    def type_time(self, value):
        '''date type'''
        if value.isdecimal():
            d = datetime.datetime.fromtimestamp(float(value))
            return d.strftime("%H:%M:%S")
        return value

    def type_datetime(self, value):
        '''date type'''
        if value.isdecimal():
            d = datetime.datetime.fromtimestamp(float(value))
            return d.strftime("%d/%m/%Y %H:%M:%S")
        return value