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 03-17-2013, 02:09 AM   #1
silverzhao
Enthusiast
silverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplane
 
silverzhao's Avatar
 
Posts: 28
Karma: 55702
Join Date: Sep 2012
Device: Kindle Touch
Kindle Touch doesn't respect LC_TIME?

My Kindle Touch is 5.3.2.1. I want to set its clock format from 12- to 24-hour format.

From the wiki here I know to change LANG=en_GB.utf8 may do this work.

But AFAIK, it is LC_TIME that controls what format date should use. So I change /var/local/system/locale like this:
Code:
LANG=en_US.utf8
LC_TIME=en_GB.utf8
LC_ALL=
then I restart Kindle. However, it doesn't work. It still shows like 1:00 PM. But I"m sure that LC_TIME has been changed to en_GB.utf8 through
Code:
# locale
So what's wrong here? How could I change the clock format but not language setting? Thank you!
silverzhao is offline   Reply With Quote
Old 03-17-2013, 05:37 AM   #2
aditya3098
Valar
aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.
 
aditya3098's Avatar
 
Posts: 592
Karma: 1578840
Join Date: Jan 2012
Location: Far, far away (from radio shack) :(
Device: Kindle touch (hacked to the core) 5.3.2.1
You could go to the settings menu and change the language from en-US to en-GB
aditya3098 is offline   Reply With Quote
 
Enthusiast
Old 03-17-2013, 12:38 PM   #3
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 710
Karma: 2290994
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Time formatting in title bar is handled completely by JavaScript code at /usr/share/webkit-.0/pillow/javascripts/default_status_bar.js. It relies on (non-standard?) DateTimeFormat object accessible from JavaScript and provided by Kindle's WebKitGTK library. Object constructor has following signature:
Code:
/**
 * Creates an instance of DateTimeFormat object.
 *
 * @constructor
 *
 * @param {string} format Datetime format (at least, "short-time" is recognized).
 * @param {string=} timeZone Optional time zone for converting current time (at least, "GMT" is recognized).
 */
function DateTimeFormat(format, timeZone) { /* ... */ }
Formatting code uses format method of this object, which expects standard JavaScript Date object as parameter.

I believe, DateTimeFormat object forwards formatting requests to ICU library object created by DateFormat::createDateTimeInstance function.

It's possible to change time format independently of current locale with runtime replacing of DateTimeFormat object by executing following command:
Code:
lipc-set-prop com.lab126.pillow interrogatePillow '{"pillowId": "default_status_bar", "function": "DateTimeFormatter = {\"format\": function(date){return date.getHours()+\":\"+date.getMinutes();}}; StatusBar.clock.update();"}'
(It will change time format to 24-hour and will work only until Pillow restart or full reboot).
eureka is offline   Reply With Quote
Old 03-18-2013, 02:02 AM   #4
silverzhao
Enthusiast
silverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplanesilverzhao makes transoceanic flights without the assistance of an airplane
 
silverzhao's Avatar
 
Posts: 28
Karma: 55702
Join Date: Sep 2012
Device: Kindle Touch
Quote:
Originally Posted by eureka View Post
Time formatting in title bar is handled completely by JavaScript code at /usr/share/webkit-.0/pillow/javascripts/default_status_bar.js. It relies on (non-standard?) ...
Thank you! It's very helpful! I'll have a try.
silverzhao 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
Troubleshooting Kindle Touch: Wi-fi doesn't connect myral Amazon Kindle 6 01-03-2013 11:03 AM
New KF in respect to Amazon Video or Audible rkw News 2 09-10-2012 06:17 PM
Kindle Collections for Calibre doesn't work with the Kindle Touch! apastuszak Amazon Kindle 8 04-18-2012 03:23 PM
No Respect Spyderman Introduce Yourself 4 04-15-2011 12:46 PM
Does iBooks and ADE respect opf:file-as ? NicolasR ePub 1 02-08-2011 04:58 PM


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


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