|
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.
|