|
|
#1 |
|
दाल भात
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 193
Karma: 1656764
Join Date: Apr 2024
Device: Kindle 11th Gen; Clara BW
|
How does Kobo Utilities set the time on a device?
Seems to work. How?
|
|
|
|
|
|
#2 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
|
|
|
|
|
#3 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 366
Karma: 2283182
Join Date: May 2024
Location: Salisbury, UK
Device: Assorted Kobo, Boox, PocketBook, Xteink & Kindle readers
|
I'm also curious. Thank you for that, but I'm afraid that the code quoted above means nothing to me: I lack the relevant education.
I was aware that KU creates a file on the device. But what does the device then do with that file? My assumption is that when it's disconnected, it somehow sees that the new file exists, reads it, checks the file's datestamp against the internal clock, takes the time written by the source computer in the file, adds the elapsed time between creation and now, and then sets the clock to the resulting time. Is that correct? |
|
|
|
|
|
#4 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,529
Karma: 154365185
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
But then the time is not accurate as it takes time to eject, read the file, and set the time.
|
|
|
|
|
|
#5 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,193
Karma: 84699244
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
I know it's not accurate but how i.portant is it to have the device time precise to the millisecond?
|
|
|
|
|
|
#6 |
|
दाल भात
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 193
Karma: 1656764
Join Date: Apr 2024
Device: Kindle 11th Gen; Clara BW
|
Plus or minus a few seconds won't cast a shadow over my reading on the device.
|
|
|
|
|
|
#7 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,529
Karma: 154365185
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I just changed the time on my Libra 2 using the Date and Time settings. It was roughly 4 minutes ahead. That's not bad considering I've not change the time in a long time.
I like the way Sony did the date/time. It got updated when you plugged the Reader into the USB port. |
|
|
|
|
|
#8 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,193
Karma: 84699244
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Quote:
Sent from my SM-X238U using Tapatalk |
|
|
|
|
|
|
#9 | |
|
दाल भात
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 193
Karma: 1656764
Join Date: Apr 2024
Device: Kindle 11th Gen; Clara BW
|
Quote:
Now we know. I learn something new here everyday. PeterT, take the rest of the day off. |
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Kobo] Kobo Utilities strange numbers in store position | palaran | Kobo Reader | 6 | 03-28-2025 03:53 AM |
| Kobo Utilities Question | normaprice | Kobo Reader | 3 | 10-15-2021 06:53 AM |
| Aura H2O Kobo Utilities reporting 2 books not on device | Boneist | Kobo Reader | 11 | 10-29-2017 07:33 PM |
| Help with Kobo Utilities needed | chiara_sc | Kobo Reader | 3 | 09-02-2016 08:05 PM |
| device deconnection each time I touch .kobo folder | fxp33 | Kobo Developer's Corner | 6 | 08-25-2013 04:17 PM |