summaryrefslogtreecommitdiff
path: root/python/psutil
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-02-02 12:00:37 -0500
committerMatt A. Tobin <email@mattatobin.com>2018-02-02 12:00:37 -0500
commita164a1ab763fc9bd1aa603308fbdac184b9f7100 (patch)
tree59332b13537a0c006c090ae925e8d3be50bb4699 /python/psutil
parentd532d899a2a4dbd53d94737cb82bc636e90bea90 (diff)
downloaduxp-a164a1ab763fc9bd1aa603308fbdac184b9f7100.tar.gz
Use UTC where appropriate in python files
Diffstat (limited to 'python/psutil')
-rw-r--r--python/psutil/docs/conf.py2
-rwxr-xr-xpython/psutil/examples/top.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/python/psutil/docs/conf.py b/python/psutil/docs/conf.py
index 9fa163b65e..ad880110f8 100644
--- a/python/psutil/docs/conf.py
+++ b/python/psutil/docs/conf.py
@@ -18,7 +18,7 @@ import os
PROJECT_NAME = "psutil"
AUTHOR = "Giampaolo Rodola'"
-THIS_YEAR = str(datetime.datetime.now().year)
+THIS_YEAR = str(datetime.datetime.utcnow().year)
HERE = os.path.abspath(os.path.dirname(__file__))
diff --git a/python/psutil/examples/top.py b/python/psutil/examples/top.py
index 7aebef1d42..30df417f55 100755
--- a/python/psutil/examples/top.py
+++ b/python/psutil/examples/top.py
@@ -165,7 +165,7 @@ def print_header(procs_status, num_procs):
st.sort(key=lambda x: x[:3] in ('run', 'sle'), reverse=1)
print_line(" Processes: %s (%s)" % (num_procs, ' '.join(st)))
# load average, uptime
- uptime = datetime.now() - datetime.fromtimestamp(psutil.boot_time())
+ uptime = datetime.utcnow() - datetime.fromtimestamp(psutil.boot_time())
av1, av2, av3 = os.getloadavg()
line = " Load average: %.2f %.2f %.2f Uptime: %s" \
% (av1, av2, av3, str(uptime).split('.')[0])