12-22-2019, 06:01 PM | #1 |
Connoisseur
Posts: 70
Karma: 11789
Join Date: Dec 2019
Device: PW4
|
help with kindle time setting
I am confused about setting the correct time on my jailbroken pw4.
I issue the following commands to set the time: 1) ntpdate -u 0.ca.pool.ntp.org 2) hwclock -w Both clocks now show the same time now, however it is exactly 2 minutes fast. What am I doing wrong? Thanks for the help! |
12-22-2019, 06:16 PM | #2 |
BLAM!
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Use setdate (it accepts an epoch (i.e., from date +%s)).
|
Advert | |
|
12-22-2019, 06:47 PM | #3 |
Connoisseur
Posts: 70
Karma: 11789
Join Date: Dec 2019
Device: PW4
|
Hi niluje, can you give me a little more detail on using setdate? I can't find a formal syntax for it. I would like to pull the correct time from the internet.
Thanks! |
12-22-2019, 09:21 PM | #4 |
Connoisseur
Posts: 70
Karma: 11789
Join Date: Dec 2019
Device: PW4
|
Any other ideas why ntp is off by 2 minutes?
|
12-22-2019, 10:13 PM | #5 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
My nickname as author, ah... "Date-Time" (or something like that in the title). The exact purpose being to set the Kindle from the NTP network. Not the exact purpose in repeating the published: Code:
man date Last edited by knc1; 12-22-2019 at 10:17 PM. |
|
Advert | |
|
12-22-2019, 10:43 PM | #6 |
BLAM!
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Define "off".
What's shown in the Kindle status bar != what date will output. Hence my recommendation of using setdate over date, because it does extra crap to resync the UI without having to restart it. Welcome to Kindle . |
12-23-2019, 12:59 AM | #7 | |
Connoisseur
Posts: 70
Karma: 11789
Join Date: Dec 2019
Device: PW4
|
Quote:
|
|
12-23-2019, 01:05 AM | #8 |
Connoisseur
Posts: 70
Karma: 11789
Join Date: Dec 2019
Device: PW4
|
If the syntax for 'setdate' is the same for 'date', there is no option for obtaining the correct time from an internet time source (that I can see in man date). I need a scriptable/programmatic way to access the internet time/date and correct the local clock.
|
12-23-2019, 08:59 AM | #9 |
BLAM!
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Set via ntp, get the fixed epoch via date, feed it to setdate?
|
12-23-2019, 10:17 AM | #10 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Just read the script for yourself, I have it released as an Open Source posting. PS: in case you are not familiar with the man(ual) command in Linux and other *nix type systems, it is not limited to the 'date' example I posted. You really don't need us to copy the information down for you. If you do not have a full Linux system, but only a cut-down embedded version, your favorite web search engine can find you copies of the manual pages. It was one of the first things ever added to web search engines. |
|
12-23-2019, 11:48 AM | #11 |
Connoisseur
Posts: 70
Karma: 11789
Join Date: Dec 2019
Device: PW4
|
sorry, i did mean to re-invent anything; i just assumed that this feature was executed from within the kual gui, whereas i wanted a programmatic solution. I'm guessing i was wrong, and your solution can be executed from within a program? Remember I also have wifi off, so my solution also turns wifi on temporarily. Programing is all about standing on the shoulders of others!
Last edited by handyguy; 12-23-2019 at 12:30 PM. |
12-23-2019, 12:02 PM | #12 |
Nil adsuetudine maius
Posts: 278
Karma: 500000
Join Date: Nov 2019
Location: US
Device: PW4
|
As far as I can see much of Kindle land runs on scripted busybox commands, whether from Amazon or the local wizards here. You can do almost anything on the command line once you look at what the scripts reference.
|
12-23-2019, 01:29 PM | #13 | |
Grand Sorcerer
Posts: 5,262
Karma: 98804578
Join Date: Apr 2011
Device: pb360
|
Quote:
|
|
12-23-2019, 10:10 PM | #14 |
Connoisseur
Posts: 70
Karma: 11789
Join Date: Dec 2019
Device: PW4
|
Unfortunately, I am not enough of a programming wiz to figure out the correct syntax to take the NTP time through to setdate/date.
Perhaps the knc1-date-time could be used, however the wifi is usually off to save battery life. |
12-23-2019, 11:13 PM | #15 |
BLAM!
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
You... kinda don't have to?
ntp uses settimeofday()/adjtime() date uses gettimeofday() As long as you do things in order (i.e., ntpdate -> date +%s -> setdate: ntp sets, date gets, setdate sets to what date returned), everything will be coherent. If it isn't, your NTP setup is borked (and/or you have extra TZ/DST shenanigans to take care of first). ---- Or, just try @knc1's extension, which goes with ntpdate -> hwclock -w Last edited by NiLuJe; 12-23-2019 at 11:22 PM. |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Troubleshooting Kindle, Wi-Fi, 6" Time Setting? | Guiltyr1 | Amazon Kindle | 10 | 10-26-2014 12:29 PM |
Setting Time on the Kindle | DreamWriter | Amazon Kindle | 5 | 03-19-2011 10:32 PM |
Troubleshooting [Q] setting local time on unregistered kindle | random43743 | Amazon Kindle | 8 | 01-18-2011 06:20 PM |
setting time on Kindle | anzacman | Amazon Kindle | 9 | 05-25-2010 07:05 PM |
Setting the Time | pcinfoman | Sony Reader | 5 | 01-28-2010 09:41 AM |