diff --git a/sources/contents/code/dataengine.py b/sources/contents/code/dataengine.py index 863710e..c196c58 100644 --- a/sources/contents/code/dataengine.py +++ b/sources/contents/code/dataengine.py @@ -301,6 +301,16 @@ class DataEngine: elif (self.parent.timeFormat.split('$longtime')[0] != self.parent.timeFormat): value = str(data[QString(u'DateTime')].toString(Qt.SystemLocaleLongDate).toUtf8()) line = self.parent.timeFormat.split('$longtime')[0] + value.decode("utf-8") + self.parent.timeFormat.split('$longtime')[1] + elif (self.parent.timeFormat.split('$snsntime')[0] != self.parent.timeFormat): + rawDate = str(data[QString(u'DateTime')].toString(Qt.TextDate).toUtf8()) + value = rawDate.split()[0] + " " + rawDate.split()[2] + " " + \ + rawDate.split()[1] + " " + ':'.join(rawDate.split()[3].split(':')[0:2]) + line = self.parent.timeFormat.split('$snsntime')[0] + value.decode("utf-8") + self.parent.timeFormat.split('$snsntime')[1] + elif (self.parent.timeFormat.split('$nsnstime')[0] != self.parent.timeFormat): + rawDate = str(data[QString(u'DateTime')].toString(Qt.TextDate).toUtf8()) + value = ':'.join(rawDate.split()[3].split(':')[0:2]) + " " + rawDate.split()[0] + " " + \ + rawDate.split()[2] + " " + rawDate.split()[1] + line = self.parent.timeFormat.split('$nsnstime')[0] + value.decode("utf-8") + self.parent.timeFormat.split('$nsnstime')[1] else: line = self.parent.timeFormat text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] diff --git a/sources/contents/ui/configwindow.ui b/sources/contents/ui/configwindow.ui index a0e1db6..61d438f 100644 --- a/sources/contents/ui/configwindow.ui +++ b/sources/contents/ui/configwindow.ui @@ -66,7 +66,9 @@ $time - time in default format $isotime - time in ISO format $shorttime - time in short format -$longtime - time in log format +$longtime - time in log format +$snsntime - time in format 'string number string number' +$nsnstime - time in format 'number string number string' Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter