SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
That may end up being the best I can do on Linux. In fact I was literally looking for "America/New_York" out there somewhere as that is the timezone designation used in ics (calendar) files in Outlook, Thunderbird Lightning and probably everyone's ics format. However, that doesn't mean it is a standard beyond ics.
For example, the Thunderbird error console gives: "Couldn't find (UTC-5:00) Eastern Time (US & Canada)", for entries so marked.
I guess I can always set it as a global environment variable.
jamison20000e:
Quote:
In which case, perhaps: %c America, New York
Where does that "%c America, New York" go? Looks like part of a format parameter to some command, but I don't see the context.
However, you still have to know the menu navigation (2, 49, 1, 1) to get the right value. That is no better than simply knowing the timezone string you want and setting that directly in the script. Which is what I'm currently doing with
I just cleared up some confusion that I had because of this post. This might also help others.
By default, Slackware's timeconfig utility (which is run during the setup process) lists the US timezones first. If you never scrolled down to the "America" section, you might've just selected Eastern (which is the same timezone as America/New_York), so the command provided by chris.willing would output:
However, if you scroll further down the timeconfig timezone section to the America section, you could then select America/New_York, which would make his command work as intended.
So, mfoley, if you've been getting US/Eastern when you were wanting America/New_York, use the timeconfig script to change your system to the one you desire.
If you were already aware of this and were wanting something different, sorry for the noise.
chris.willing is on to something useful ... here is another way to do what he did.
You could make a script say, getzone in your PATH and chmod 755 /path/to/getzone
Code:
#!/bin/sh
#
# getzone ... expands your TZ to the long name symlinked from /etc/localtime-copied-from into /usr/share/zoneinfo/
#
tmpTZ=""
[ -L /etc/localtime-copied-from ] && tmpTZ="$(readlink /etc/localtime-copied-from |sed -e 's|/usr/share/zoneinfo/||')"
if [ "$tmpTZ" != "" ]
then
echo "$tmpTZ"
exit 0
else
date '+%Z'
exit 1
fi
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.