summaryrefslogtreecommitdiffstats
path: root/python/psutil/examples/top.py
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
commitc0c702a5e3284e843e680064b4c6a7280242c567 (patch)
tree59332b13537a0c006c090ae925e8d3be50bb4699 /python/psutil/examples/top.py
parent45d4933f568d8814d8045852a9a1b006b912dcf7 (diff)
downloadUXP-c0c702a5e3284e843e680064b4c6a7280242c567.tar
UXP-c0c702a5e3284e843e680064b4c6a7280242c567.tar.gz
UXP-c0c702a5e3284e843e680064b4c6a7280242c567.tar.lz
UXP-c0c702a5e3284e843e680064b4c6a7280242c567.tar.xz
UXP-c0c702a5e3284e843e680064b4c6a7280242c567.zip
Use UTC where appropriate in python files
Diffstat (limited to 'python/psutil/examples/top.py')
-rwxr-xr-xpython/psutil/examples/top.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/psutil/examples/top.py b/python/psutil/examples/top.py
index 7aebef1d4..30df417f5 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])