View Single Post
Old 11-02-2026, 05:37 PM   #2
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 14,193
Karma: 84699244
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Through the same means as Kobo desktop used to. It creates a file in the
.Kobo directory called epoch.conf that contains a Linux epoch time, number of seconds from January 1, 1970 00:00:00 UTC.

The code is found in the Kobo Utilities source file action.py
[code]def set_time_on_device(
device: KoboDevice,
gui: ui.Main,
dispatcher: Dispatcher,
load_resources: LoadResources,
):
del dispatcher, load_resources
debug("start")
now = calendar.timegm(time.gmtime())
debug("time=%s" % now)
epoch_conf_path = os.path.join(
device.path, KOBO_ROOT_DIR_NAME, KOBO_EPOCH_CONF_NAME
)
with open(epoch_conf_path, "w") as epoch_conf:
epoch_conf.write("%s" % now)
gui.status_bar.show_message(
_("Kobo Utilities") + " - " + _("Time file created on device."), 3000
)
debug("end")
[code]

Last edited by PeterT; 11-02-2026 at 06:55 PM.
PeterT is offline   Reply With Quote