Moved the packing of XML tree into NWTree, and added a function for formatting time stamps

This commit is contained in:
Veronica K. B. Olsen
2020-05-09 13:08:11 +02:00
parent 6cdf203079
commit d44dca6a21
5 changed files with 72 additions and 40 deletions
+3 -3
View File
@@ -32,13 +32,13 @@ import sys
import nw
from os import path, mkdir, unlink, rename
from datetime import datetime
from time import time
from PyQt5.Qt import PYQT_VERSION_STR
from PyQt5.QtCore import QT_VERSION_STR, QStandardPaths, QSysInfo
from nw.constants import nwFiles, nwUnicode
from nw.common import splitVersionNumber
from nw.common import splitVersionNumber, formatTimeStamp
logger = logging.getLogger(__name__)
@@ -445,7 +445,7 @@ class Config:
## Main
cnfSec = "Main"
cnfParse.add_section(cnfSec)
cnfParse.set(cnfSec,"timestamp", datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
cnfParse.set(cnfSec,"timestamp", formatTimeStamp(time()))
cnfParse.set(cnfSec,"theme", str(self.guiTheme))
cnfParse.set(cnfSec,"syntax", str(self.guiSyntax))
cnfParse.set(cnfSec,"guidark", str(self.guiDark))