Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-10-2013, 06:47 PM   #1
Synthead
Member
Synthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enough
 
Posts: 10
Karma: 536
Join Date: Jul 2013
Device: Kindle 4NT
"date" reports correct time zone and time; UI reports a time several hours off

I pushed a file from /usr/share/zoneinfo to my kindle's /var/local/system/tz file. It shows the time zone I want when I run "date" on it, but the Kindle's time (in the UI) is several hours off. What's wrong?

For the record, this Kindle is not registered to Amazon.
Synthead is offline   Reply With Quote
Old 07-10-2013, 06:56 PM   #2
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,198
Karma: 5830426
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by Synthead View Post
I pushed a file from /usr/share/zoneinfo to my kindle's /var/local/system/tz file. It shows the time zone I want when I run "date" on it, but the Kindle's time (in the UI) is several hours off. What's wrong?

For the record, this Kindle is not registered to Amazon.
Set BOTH the system time and the hardware clock.
Both set to the same (GMT) time.

?? Is the "several hours off" happen to be your offset from TZ-0?
knc1 is offline   Reply With Quote
 
Enthusiast
Old 07-10-2013, 07:20 PM   #3
Synthead
Member
Synthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enough
 
Posts: 10
Karma: 536
Join Date: Jul 2013
Device: Kindle 4NT
Quote:
Originally Posted by knc1 View Post
Set BOTH the system time and the hardware clock.
Both set to the same (GMT) time.

?? Is the "several hours off" happen to be your offset from TZ-0?
I'll give an example. From my Linux machine, I push my Los_Angeles (PDT) zoneinfo file to /var/local/system/tz:
Code:
$ scp America/Los_Angeles kindle:/var/local/system/tz
Los_Angeles                                                                       100% 2819     2.8KB/s   00:00
On my Kindle, I run ntpdate to sync the time:
Code:
# ntpdate pool.ntp.org
10 Jul 16:16:26 ntpdate[8386]: step time server 74.120.8.2 offset 25966.135014 sec
I check the date on the Kindle:
Code:
# date
Wed Jul 10 16:17:56 PDT 2013
The time and time zone is correct. On the Kindle UI, I press the Menu button, and it reports 11:17 PM instead of the 4:17 PM on the system time. If I write the current time to the hardware clock (hwclock -w), the time in the UI remains the same.
Synthead is offline   Reply With Quote
Old 07-10-2013, 07:38 PM   #4
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,198
Karma: 5830426
Join Date: Feb 2012
Device: Too many.
And after you do a re-start? (Which should not be required)

And my earlier question - how many hours off is that time displayed in the UI?

Last edited by knc1; 07-10-2013 at 07:53 PM.
knc1 is offline   Reply With Quote
Old 07-10-2013, 08:07 PM   #5
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 4,604
Karma: 4440239
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
Yeah, it gets tricky sometimes.

Cf. /usr/sbin/setdate && /usr/sbin/settz && /usr/sbin/updatetime

The K5 ;st shortcut calls setdate with the wanted time in the %s format. (use date -D "inputfmt" +outputfmt "time" to convert, or use the output of a full fledged date from a proper Linux system).

Last edited by NiLuJe; 07-10-2013 at 08:11 PM.
NiLuJe is offline   Reply With Quote
Old 07-11-2013, 07:40 AM   #6
farfeduc
Kindle Addict
farfeduc is my name, but call me Ishmael.farfeduc is my name, but call me Ishmael.farfeduc is my name, but call me Ishmael.farfeduc is my name, but call me Ishmael.farfeduc is my name, but call me Ishmael.farfeduc is my name, but call me Ishmael.farfeduc is my name, but call me Ishmael.farfeduc is my name, but call me Ishmael.farfeduc is my name, but call me Ishmael.farfeduc is my name, but call me Ishmael.farfeduc is my name, but call me Ishmael.
 
farfeduc's Avatar
 
Posts: 32
Karma: 107412
Join Date: May 2013
Device: Kindle Paperwhite
Same problem here : Paperwhite not keeping Time

The problem has already been covered.
farfeduc is offline   Reply With Quote
Old 07-11-2013, 05:04 PM   #7
Synthead
Member
Synthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enough
 
Posts: 10
Karma: 536
Join Date: Jul 2013
Device: Kindle 4NT
Quote:
Originally Posted by NiLuJe View Post
Yeah, it gets tricky sometimes.

Cf. /usr/sbin/setdate && /usr/sbin/settz && /usr/sbin/updatetime

The K5 ;st shortcut calls setdate with the wanted time in the %s format. (use date -D "inputfmt" +outputfmt "time" to convert, or use the output of a full fledged date from a proper Linux system).
I want to set the date via NTP with a correct zoneinfo file I could fidget with "date -s MMDDhhmm[[CC]YY][.ss]", but that just feels gross working as a sysadmin

Quote:
Originally Posted by farfeduc View Post
Same problem here : Paperwhite not keeping Time

The problem has already been covered.
I don't want to register the Kindle with Amazon.
Synthead is offline   Reply With Quote
Old 07-11-2013, 05:08 PM   #8
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 4,604
Karma: 4440239
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
/usr/sbin/updatetime is Amazon's wrapper around ntp, IIRC.
NiLuJe is offline   Reply With Quote
Old 07-11-2013, 06:19 PM   #9
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,198
Karma: 5830426
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by Synthead View Post
I want to set the date via NTP with a correct zoneinfo file I could fidget with "date -s MMDDhhmm[[CC]YY][.ss]", but that just feels gross working as a sysadmin



I don't want to register the Kindle with Amazon.
Install the KUAL.ntpdate button.
Change the time server(s) or time server network(s) as desired per the directions.
knc1 is offline   Reply With Quote
Old 07-11-2013, 06:22 PM   #10
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,198
Karma: 5830426
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by Synthead View Post
Code:
# ntpdate pool.ntp.org
10 Jul 16:16:26 ntpdate[8386]: step time server 74.120.8.2 offset 25966.135014 sec
I check the date on the Kindle:
Code:
# date
Wed Jul 10 16:17:56 PDT 2013
The time and time zone is correct. On the Kindle UI, I press the Menu button, and it reports 11:17 PM instead of the 4:17 PM on the system time. If I write the current time to the hardware clock (hwclock -w), the time in the UI remains the same.
Right ! Your off by the gmt offset in the two readings.
Being a sysadmin, you can probably fix that better than we could.
knc1 is offline   Reply With Quote
Old 07-11-2013, 06:34 PM   #11
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677485
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
... this method has always worked for me:
http://wiki.mobileread.com/wiki/Kind..._the_time_zone
ixtab is offline   Reply With Quote
Old 07-11-2013, 06:38 PM   #12
Synthead
Member
Synthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enoughSynthead will become famous soon enough
 
Posts: 10
Karma: 536
Join Date: Jul 2013
Device: Kindle 4NT
Quote:
Originally Posted by ixtab View Post
... this method has always worked for me:
http://wiki.mobileread.com/wiki/Kind..._the_time_zone
That's what I mentioned in my original post. The time is still incorrect on the Kindle's UI.
Synthead is offline   Reply With Quote
Old 07-11-2013, 07:11 PM   #13
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677485
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by Synthead View Post
That's what I mentioned in my original post. The time is still incorrect on the Kindle's UI.
Try rebooting your Kindle. And maybe try symlinking the /etc/localtime file directly to the timezone file, instead of indirectly via /var/local/system/tz.

I just tried it again on a Kindle Touch, and it worked again as expected (but only after a reboot, not immediately via SSH - not even if restarting the framework).

EDIT: Yep... you're right. Even after setting up everything correctly, the K4 will simply stick to displaying UTC in the user interface. I guess "inability to show the correct timezone" is just one more thing to complain about to Amazon CS. I'm personally not terribly surprised.

Last edited by ixtab; 07-11-2013 at 07:49 PM.
ixtab is offline   Reply With Quote
Old 07-12-2013, 08:51 AM   #14
knc1
Embedded Cheerleader
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,198
Karma: 5830426
Join Date: Feb 2012
Device: Too many.
Ah, phooey.
Lab126 forgot the -u option use in their testing and/or scripting.
And that crew **gets paid** to turn out this stuff!

@ixtab: Any chance that Java is somewhere maintaining its own idea of the date/time/tz without reference to the system/hardware clocks?
I.E: A module that should only be used on systems that do not have hardware date/time?

Hmm...
I guess I could re-write the ntpdate button to store local time in the hardware of the K4.
But that seems kind of like a kludge to me.

Last edited by knc1; 07-12-2013 at 08:56 AM.
knc1 is offline   Reply With Quote
Old 07-12-2013, 09:30 AM   #15
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677485
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by knc1 View Post

@ixtab: Any chance that Java is somewhere maintaining its own idea of the date/time/tz without reference to the system/hardware clocks?
I.E: A module that should only be used on systems that do not have hardware date/time?
Nothing specific that I'd know of. But (even without being able to provide exact code), something like "get current time, and display it as Zulu time" should be straightforward to code.

It doesn't really make sense, but it's seemingly what they did. Maybe because they didn't even ship the files required to support time zones in the first place, so they assumed the only "existing" TZ would be UTC anyway?

"Who needs more than one timezone anyway? Or, for that matter, who needs the correct date and time on an e-book reader?"

ixtab is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does any major publisher offer real-time sales reports? J. Strnad Writers' Corner 7 10-24-2011 04:05 PM
360 PB360 display gets "stripes" from time to time klaetsch PocketBook 1 01-05-2011 04:49 AM
Hacks How to Correct Date/Time of Kindle (without Wireless Access) meem Amazon Kindle 4 08-20-2010 07:13 PM
SONY PRS-700 "Date and Time" problems dda Sony Reader 8 06-11-2009 01:13 PM


All times are GMT -4. The time now is 02:27 PM.


MobileRead.com is a privately owned, operated and funded community.