From 0b5945c6dcfadd57661844bfed3788103dc8675d Mon Sep 17 00:00:00 2001 From: Jordan Ruthe Date: Mon, 9 Nov 2020 16:37:08 -0500 Subject: [PATCH] Update time format --- panels/print.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/panels/print.py b/panels/print.py index 8e3118b3..a8ee6b38 100644 --- a/panels/print.py +++ b/panels/print.py @@ -4,6 +4,7 @@ import logging gi.require_version("Gtk", "3.0") from gi.repository import Gtk, Gdk, GLib +from datetime import datetime from KlippyGtk import KlippyGtk from KlippyGcodes import KlippyGcodes @@ -79,7 +80,7 @@ class PrintPanel(ScreenPanel): info = Gtk.Label("Uploaded: blah - Size: blah") info.set_halign(Gtk.Align.START) info.set_markup("Uploaded: %s - Size: %s" % ( - fileinfo['modified'], + datetime.fromtimestamp(fileinfo['modified']).strftime("%Y-%m-%d %H:%M"), humanize.naturalsize(fileinfo['size']) )) labels = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)