Add Your City To Linux's List of Time Zones
Ever feel like you're Rodney Dangerfield? You live someplace and Linux shows you no respect, time-zone-wise that is. What I mean is that you live somewhere that's not one of the time-zones that comes predefined with Linux. If that sounds like you, then read on and get Linux to show you a little respect.
Let's say for instance that we want to add Seattle, WA (the birthplace of Linux Journal) to the list of time-zones that Linux knows about. First, look in the list of predefined time-zones for a city that's in the the same time-zone as the city you want to add, in this case Los Angeles. Then as root do the following:
$ cd /usr/share/zoneinfo $ cp America/Los_Angeles America/Seattle
This will make the new "Seattle" time-zone use the same time-zone data as "Los Angeles" uses. Note: if /usr/share/zoneinfo doesn't exist try /usr/lib/zoneinfo.
Now edit the file /usr/share/zoneinfo/zone.tab and find the line for the time-zone that you copied, in this case "Los Angeles":
US +340308-1181434 America/Los_Angeles Pacific Time
Duplicate that line and change the old time-zone name to the new one:
US +473622-1221955 America/Seattle Pacific Time
The numbers are the latitude and longitude of the city in the form +/-DDMM+/-DDDMM or +/-DDMMSS+/-DDDMMSS (D=Degrees, M=Minutes, S=Seconds). You can find that information on the web, for example at infoplease.
Now, logout and log back in and you should see your new time-zone in the list of available time-zones. The screenshot below shows it added to the list of time-zones that are displayed when I hover the mouse over the KDE clock.
Mitch Frazier is an Associate Editor for Linux Journal.
|Bitcoin on Amazon! Sort of...||Sep 28, 2016|
|Free Today: September Issue of Linux Journal (Retail value: $5.99)||Sep 27, 2016|
|nginx||Sep 27, 2016|
|Epiq Solutions' Sidekiq M.2||Sep 26, 2016|
|Nativ Disc||Sep 23, 2016|
|Android Browser Security--What You Haven't Been Told||Sep 22, 2016|
- Free Today: September Issue of Linux Journal (Retail value: $5.99)
- Bitcoin on Amazon! Sort of...
- Android Browser Security--What You Haven't Been Told
- Epiq Solutions' Sidekiq M.2
- Nativ Disc
- Identity: Our Last Stand
- The Many Paths to a Solution
- Tech Tip: Really Simple HTTP Server with Python
- Securing the Programmer
Pick up any e-commerce web or mobile app today, and you’ll be holding a mashup of interconnected applications and services from a variety of different providers. For instance, when you connect to Amazon’s e-commerce app, cookies, tags and pixels that are monitored by solutions like Exact Target, BazaarVoice, Bing, Shopzilla, Liveramp and Google Tag Manager track every action you take. You’re presented with special offers and coupons based on your viewing and buying patterns. If you find something you want for your birthday, a third party manages your wish list, which you can share through multiple social- media outlets or email to a friend. When you select something to buy, you find yourself presented with similar items as kind suggestions. And when you finally check out, you’re offered the ability to pay with promo codes, gifts cards, PayPal or a variety of credit cards.Get the Guide