eric6/UI/UserInterface.py

changeset 7807
5514ca6a62ca
parent 7806
b346755b09a1
child 7808
da107cd00f63
--- a/eric6/UI/UserInterface.py	Mon Oct 19 20:02:01 2020 +0200
+++ b/eric6/UI/UserInterface.py	Wed Oct 21 20:00:57 2020 +0200
@@ -12,6 +12,7 @@
 import logging
 import shutil
 import json
+import datetime
 
 from PyQt5.QtCore import (
     pyqtSlot, QTimer, QFile, QFileInfo, pyqtSignal, PYQT_VERSION_STR, QDate,
@@ -1478,6 +1479,7 @@
                 if os.path.exists(filename):
                     # eric was installed via pip (i.e. eric-ide)
                     try:
+                        installDateTime = datetime.datetime.now(tz=None)
                         with open(filename, "r") as infoFile:
                             installInfo = json.load(infoFile)
                         installInfo["guessed"] = True
@@ -1490,6 +1492,8 @@
                             installInfo["user"] = os.getlogin()
                             installInfo["exe"] = sys.executable
                         installInfo["installed"] = True
+                        installInfo["installed_on"] = installDateTime.strftime(
+                            "%Y-%m-%d %H:%M:%S")
                         installInfo["remarks"] = ""
                         installInfo["sudo"] = not os.access(
                             installInfo["eric"], os.W_OK)

eric ide

mercurial