Difference between revisions of "North American DST Changes"

From MythTV Official Wiki
Jump to: navigation, search
(User Notes)
(General)
Line 28: Line 28:
  
 
to sync with an NTP server (NOTE: this command does NOT set up ntpd for you, it's just a one-time sync).
 
to sync with an NTP server (NOTE: this command does NOT set up ntpd for you, it's just a one-time sync).
 +
 +
Here is a little script that should do the trick (works on RH5.2 up )
 +
Note not all FC distros include 'zic '
 +
 +
<i>newZones.sh</i>
 +
<pre>
 +
#!/bin/bash
 +
echo "----------------------------------"
 +
echo " Time Zone Update "
 +
echo " >>>> CURRENT TIME <<<<"
 +
date
 +
echo
 +
 +
mkdir tzinfo
 +
mkdir tzinfo/tmp
 +
mkdir tzinfo/tmp/tzoneinfo
 +
 +
cd tzinfo
 +
wget ftp://elsie.nci.nih.gov/pub/tzdata2007c.tar.gz
 +
tar zxf tzdata2007c.tar.gz
 +
zic -d tmp/zoneinfo northamerica
 +
cd tmp/zoneinfo
 +
cp -r * /usr/share/zoneinfo
 +
cd  ../../..
 +
# Update the local timezone file
 +
 +
mv /etc/localtime /etc/localtime.rh6.2
 +
ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
 +
 +
 +
rm -rf tzinfo/*
 +
rmdir  tzinfo/
 +
 +
echo
 +
echo " >>>> NEW TIME <<<<"
 +
date
 +
echo
 +
 +
</pre>
  
 
== User Notes ==
 
== User Notes ==

Revision as of 17:07, 13 March 2007

General

As most North American users know by now, the U.S. gov't has mandated that DST changes start earlier beginning in 2007.

Being that Myth is heavily dependent on having the correct time information, having the correct time is crucial. Here is how update your time:

cd
mkdir tzinfo
cd tzinfo
wget ftp://elsie.nci.nih.gov/pub/tzdata2007c.tar.gz
tar zxf tzdata2007c.tar.gz
zic -d /tmp/zoneinfo northamerica
cd /tmp/zoneinfo
cp -r * /usr/share/zoneinfo

After performing the above commands, you should have new time zone info in /usr/share/zoneinfo. Next just run

timeconfig

to select your timezone. After setting your timezone, you may want to run

ntpdate 128.100.100.128

to sync with an NTP server (NOTE: this command does NOT set up ntpd for you, it's just a one-time sync).

Here is a little script that should do the trick (works on RH5.2 up ) Note not all FC distros include 'zic '

newZones.sh

#!/bin/bash
echo "----------------------------------"
echo " Time Zone Update "
echo " >>>> CURRENT TIME <<<<"
date
echo

mkdir tzinfo
mkdir tzinfo/tmp
mkdir tzinfo/tmp/tzoneinfo

cd tzinfo
wget ftp://elsie.nci.nih.gov/pub/tzdata2007c.tar.gz
tar zxf tzdata2007c.tar.gz
zic -d tmp/zoneinfo northamerica
cd tmp/zoneinfo
cp -r * /usr/share/zoneinfo
cd  ../../..
# Update the local timezone file

mv /etc/localtime /etc/localtime.rh6.2
ln -s /usr/share/zoneinfo/America/New_York /etc/localtime


rm -rf tzinfo/*
rmdir  tzinfo/

echo
echo " >>>> NEW TIME <<<<"
date
echo

User Notes

  • Gentoo Users
I built my Gnetoo/Mythbox over a year ago (almost2) and forgot to update the timezone for the new US DST settings.
All my Schedule Times were off by an hour (like the 11:00 news showed up at 10:00)....
do the following (as root)

emerge --sync
emerge sys-libs/timezone-data

Check your clock and the Listings in myth
That's it

Resources

LinuxQuestions.org

Time Zone Sources

Time Zone Sources FTP

General Daylight Time Info