maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   How To: Add your home town to Clock (https://talk.maemo.org/showthread.php?t=20729)

tbrminsanity 2008-06-05 14:06

How To: Add your home town to Clock
 
This information is taken from the following source.

1. Get root access (I use the ssh approach (ssh root@localhost))
2. cd /usr/share/osso-clock/
3. nano wdb-parsed.txt (you can use vi if you want but I've installed and prefer nano over vi)
4. Here is my home city info:
  • Regina|CA|Canada|America/Regina|285|262|en_CA
  • (City name)|(Country initials)|(Country)|(Time zone)|(x co-ordinate on clock image)|(y co-ordinate on clock image)|(Default language)
5. Save and your done

Now you will need to add your city's name into OS2008. This info comes from the following post.

1. cd /usr/share/local/(enter language here mine is en_CA)/LC_MESSAGES/
2. Copy osso-cities.mo from this location to a Linux box
* If the file does not exist then grab the file from another language (I had to grab en_US)
3. msgunfmt osso-cities.mo -o osso-cities.po
4. nano osso-cities.po (or vi osso-cities.po if you prefer vi over nano)
5. Add the following 4 lines (the blank spaces are important!)

msgid "osso_db_city_regina"
msgstr "Regina"

6. msgfmt osso-cities.po -o osso-cities.mo
7. Copy osso-cities.mo back to your PDA and overwrite the old file.

I hope this helps people out.

qwerty12 2008-06-05 15:45

Re: How To: Add your home town to Clock
 
Thanks to Scott Bertin.

This in theory should work for Regina (fixing the name display problem)

Even though I am a Brit, I assume you use en_US :P

Place the following file in /usr/share/locale/en_US/LC_MESSAGES (make a backup of the original first)

http://www.mediafire.com/?ecxc2swhmbc

(I admit I didn't have to add a town. Why? Because I come from London, BRAPP, the home of time, GMT baby :P)

tbrminsanity 2008-06-05 18:11

Re: How To: Add your home town to Clock
 
Quote:

Originally Posted by qwerty12 (Post 189027)
This in theory should work for Regina (fixing the name display problem)

Even though I am a Brit, I assume you use en_US :P

I currently use en_UK but I would prefer to use en_CA. I noticed in the the folder that there was a bunch of .mo files. What do I need to use to edit them? I could just look for the entry I need to change in there.

tbrminsanity 2008-06-05 20:55

Re: How To: Add your home town to Clock
 
I think someone should create a project at either Google code or Sourceforge and keep an up to date location DB. That way people will only have to download a zip/rar rather then enter in thousands of locations.

There should be at least one (but no more then 3) locations per administrative district. Example each Canadian Province and Territory should have it's capitol (including Ottawa) in there plus any other major cities like Vancouver, Calgary, Saskatoon, Brandon, Thunder Bay, Sudbury, Sault Ste Marie, London, Montreal, Moncton, Cape Breton, and Labrador City.

The zip/rar would most likely be unzipped from /usr/share/ so that we could hit both wdb-parsed.txt and the appropriate osso-cities.mo files.

Benson 2008-06-05 21:02

Re: How To: Add your home town to Clock
 
Why? The point, as far as I can see, is one per time zone; therefore, one in US Eastern, and one in Canadian Eastern, because DST may differ, but not one for each US state in Eastern. (I think this is accomplished from the factory.)

To me, it's just a cool tweak to be able to put my very own hometown on, but if I'm not going wild with that, any city guaranteed to be the same offset from UTC is close enough... so the 3-max seems pointless.

tbrminsanity 2008-06-05 21:06

Re: How To: Add your home town to Clock
 
Quote:

Originally Posted by Benson (Post 189148)
Why? The point, as far as I can see, is one per time zone; therefore, one in US Eastern, and one in Canadian Eastern, because DST may differ, but not one for each US state in Eastern. (I think this is accomplished from the factory.)

To me, it's just a cool tweak to be able to put my very own hometown on, but if I'm not going wild with that, any city guaranteed to be the same offset from UTC is close enough... so the 3-max seems pointless.

I like to know where different cities near me are. Besides there is at least on city per nation in Europe for the map. Each province and state in Canada and the US is similar to that and as such show have equal representation. The other advantage of this project would be that down the line when DST goes out of fashion, individual provinces and states that abolish DST would have their info updated. A little work now would save a lot of work later on.

Benson 2008-06-05 21:25

Re: How To: Add your home town to Clock
 
I dunno 'bout Canada, they're wierd up there. :p In the US, though, states don't have the autonomy regarding time zones that European nations do. The Federal government is in charge of it, so they're not really similar.

When DST goes out of fashion? ROFL.

I'm from Indiana, where we used to have straight-up time; UTC -0500, no ifs, ands, or buts. Our governor, Mitch, railroaded DST through here, so we could "be like every one else" and "save lots of money on energy". Well, we are like everyone else now; we waste time switching any clocks not synchronized automatically, for a net loss in money. (And it's not like the parks who could save money on outdoor lighting couldn't have changed their hours without changing the clocks, I suppose.)

Much as I'd like to fantasize about rationality, no state is really going to change to be different from everyone else. Moreover, at least in the US, all Mitch could do was make a Federal agency review our time zone, and send a recommendation along. No bureaucrat in Washington has either the brains or the intestines to approve a state abolishing DST, even if some legislature and governor were smitten with enough sense to send up such a recommendation.

The amount of work, it seems, would be the same either way, as it's the same number of provinces... but I think it's unlikely we need it at all from that perspective, politics being as decoupled from rationality as it is.

Still, I do appreciate the info, and if you do get such a project set up, I'd probably contribute an entry or two for Indiana...

tbrminsanity 2008-06-06 02:59

Re: How To: Add your home town to Clock
 
@Benson
I think I will do that then. I will post the project when its up and running (most likely with the Canadian provinces already entered).

tbrminsanity 2008-06-06 04:33

Re: How To: Add your home town to Clock
 
Here is the location of the project. Feel free to download the two files, modify them and submit them to me.

http://code.google.com/p/osso-clock-location-pack/

tbrminsanity 2008-12-13 14:07

Re: How To: Add your home town to Clock
 
Canada is done and you can download the files from the project site.

gultig 2008-12-13 14:58

Re: How To: Add your home town to Clock
 
Quote:

Originally Posted by Benson (Post 189156)
I dunno 'bout Canada, they're wierd up there. :p In the US, though, states don't have the autonomy regarding time zones that European nations do. The Federal government is in charge of it, so they're not really similar.

You've never visited non dst abiding Arizona, have you?

TheRealBubba 2008-12-13 17:13

Re: How To: Add your home town to Clock
 
is there any way to make this into a one-click installable deb? I think if that were done & put on one of the standard repos, it would be way popular.

tbrminsanity 2009-03-17 16:12

Re: How To: Add your home town to Clock
 
Quote:

Originally Posted by TheRealBubba (Post 249290)
is there any way to make this into a one-click installable deb? I think if that were done & put on one of the standard repos, it would be way popular.

If you can create the deb I would be more then happy to put it on the project site. I unfortunately don't know how to do it right now.

speculatrix 2009-03-17 23:04

Re: How To: Add your home town to Clock
 
indeed, a previous thread discussed doing this and someone posted the file for Arizona which has been invaluable seeing that I have family there and visit regularly

Lord Raiden 2009-03-18 00:39

Re: How To: Add your home town to Clock
 
I'd love to know how to add Detroit (I actually live in a no-name town, so detroit is good enough for me. hehe) to the list. I don't have all the numbers needed, so if someone posted the entry, I'd be very appreciative.

Zebee 2009-03-18 05:29

Re: How To: Add your home town to Clock
 
What would be useful is a fiel that adds the GMT offset to the towns already in the file.

This is so if your place isn't listed, you can at least get a timezone that's the same as yours!

Not that that helps anyone in Adelaide, South Australia, as their half hour off timezone is, I think, unique. And I don't think there's any city in the list with Perh, Western Australia's timezone either.

I can provide time info, but not sure about image location info.

tbrminsanity 2009-03-20 19:28

Re: How To: Add your home town to Clock
 
I encourage everyone to submit changes to my project for their local towns. I've got all the documentation on how to modify the files on the project page. I would love someone to enter all the information for the US and Australia into the project. It would help a lot.


All times are GMT. The time now is 07:12.

vBulletin® Version 3.8.8