Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Upcoming US Daylight Savings Time changes
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Pasketti
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 108
Location: Austin, Texas

PostPosted: Fri Jan 26, 2007 2:11 am    Post subject: [solved] Upcoming US Daylight Savings Time changes Reply with quote

In previous years, Daylight Savings Time has started on the first Sunday in April, and ended on the last Sunday in October.

But this year, the law changes. Now, it will start on the second Sunday in March and end on the first Sunday in November.

Is there an update for the zoneinfo files? Or will I have to find whatever package they come in, get the source for CST6CDT, edit it, and then zic the thing?


Last edited by Pasketti on Tue Jan 30, 2007 11:31 pm; edited 1 time in total
Back to top
View user's profile Send private message
Pasketti
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 108
Location: Austin, Texas

PostPosted: Tue Jan 30, 2007 11:31 pm    Post subject: Reply with quote

Did more poking around. The change was evidently patched in already.

Code:
zdump -v /etc/localtime | grep "2007"
/etc/localtime  Sun Mar 11 07:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 CST isdst=0
/etc/localtime  Sun Mar 11 08:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 CDT isdst=1
/etc/localtime  Sun Nov  4 06:59:59 2007 UTC = Sun Nov  4 01:59:59 2007 CDT isdst=1
/etc/localtime  Sun Nov  4 07:00:00 2007 UTC = Sun Nov  4 01:00:00 2007 CST isdst=0
Back to top
View user's profile Send private message
serotonin
n00b
n00b


Joined: 24 Dec 2003
Posts: 50

PostPosted: Mon Feb 05, 2007 2:33 pm    Post subject: Reply with quote

Nice research, I was worried about this.
_________________
http://www.tankprofiler.com
Back to top
View user's profile Send private message
kaprino
n00b
n00b


Joined: 07 Feb 2007
Posts: 8

PostPosted: Wed Feb 07, 2007 2:57 am    Post subject: packages needed for new US Day Light Savings Time changes Reply with quote

Hi
Our Linux Gentoo admin just quit a while ago, now I need help to resolve/patch the new DST Changes. I only used redhat before, so Gentoo is new to me. I ran the zdump -v /etc/localtime | grep "2007" and it seems that my Gentoo server is not setup for the new Daylight Savings changes. Is there documetnation on How to patch Gentoo for the new DST changes? Do I need to upgrade glibc and other packages also? How do you install them on a production mailserver withou affecting ht system ? This server is running postfix, SpamAssasin, LDAP and IMAP. If am on the wrong forum please let me know.

Thanks
Kap
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Wed Feb 07, 2007 3:52 am    Post subject: Reply with quote

As long as you are running a new enough version of glibc, you should be able to just update the sys-libs/timezone-data package to get the latest DST changes.

With older versions of glibc, the timezone data is not a separate package.
Back to top
View user's profile Send private message
kaprino
n00b
n00b


Joined: 07 Feb 2007
Posts: 8

PostPosted: Wed Feb 07, 2007 4:01 am    Post subject: Reply with quote

Thanks cyrillic for replying,
I am new to Gentoo please bare with me. Ok so I might not have to update glibc, how do I know what version of glibc and pull the latest. Do use I use portage, any help will be greatly appreciated.

Kap
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Wed Feb 07, 2007 4:27 am    Post subject: Reply with quote

I don't know how far out-of-date your system is, but you could always try this to see if a glibc update is needed.
Code:
# emerge --sync
# emerge -pv timezone-data
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Wed Feb 07, 2007 5:09 am    Post subject: Reply with quote

Merged the preceding four posts.
Back to top
View user's profile Send private message
kaprino
n00b
n00b


Joined: 07 Feb 2007
Posts: 8

PostPosted: Wed Feb 07, 2007 7:37 pm    Post subject: Reply with quote

Below is the information from emerge -pv timezone-data. If I emerge the timezone will it anyway affect my production server? I am not sure what the dependcy flags mean. Also how do I know what glibc version i have installed?

Thanks,
kap

~ $ emerge --search timezone-data
Searching...
[ Results for search key : timezone-data ]
[ Applications found : 1 ]

* sys-libs/timezone-data
Latest version available: 2006o
Latest version installed: [ Not Installed ]
Size of files: 336 kB
Homepage: ftp://elsie.nci.nih.gov/pub/
Description: Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)
License: GPL-2


~ $ emerge -pv timezone-data

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild N ] sys-libs/timezone-data-2006o USE="nls" 336 kB

Total size of downloads: 336 kB
Back to top
View user's profile Send private message
Pasketti
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 108
Location: Austin, Texas

PostPosted: Wed Feb 07, 2007 8:29 pm    Post subject: Reply with quote

The easiest way to find out your version of glibc would be to attempt to upgrade it:

emerge -p glibc

It will then list the current version, and the version it wants to upgrade you to.
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Thu Feb 08, 2007 3:27 am    Post subject: Reply with quote

kaprino wrote:
~ $ emerge -pv timezone-data

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild N ] sys-libs/timezone-data-2006o USE="nls" 336 kB

Total size of downloads: 336 kB

You are in kind of a gray area here.

I can see two things from what you have posted.
    Your glibc dates back to before the timezone-data package was a separate package
    The timezone-data package is not requiring you to upgrade glibc

You can probably get away with "emerge timezone-data", but I can't promise that overwriting part of glibc like this is safe to do.
Back to top
View user's profile Send private message
kaprino
n00b
n00b


Joined: 07 Feb 2007
Posts: 8

PostPosted: Thu Feb 08, 2007 2:22 pm    Post subject: Reply with quote

Looks like I am screwed, I am running 2.3.4.20040808-r1. This what happen when I run emerge -Dvp on a production mail server. How well Gentoo handle dependencies? Will it break my mail server that is running postfix, spamassain? It will probably take a while to build as well?

Thanks,


$ emerge -Dvp glibc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild N ] virtual/libintl-0 0 kB
[ebuild U ] sys-apps/findutils-4.3.0 [4.1.20-r1] USE="nls -build (-selinux) -static (-afs%) (-debug%)" 1,102 kB
[ebuild N ] sys-devel/binutils-config-1.9-r2 0 kB
[ebuild U ] sys-devel/binutils-2.16.1-r3 [2.15.92.0.2-r1] USE="nls -multislot% -multitarget -test% -vanilla% (-bootstrap%) (-build%) (-debug%) (-uclibc%)" 12,367 kB
[ebuild U ] sys-kernel/linux-headers-2.6.17-r1 [2.4.21-r1] USE="-gcc64%" 40,346 kB
[ebuild U ] sys-devel/gcc-config-1.3.13-r4 [1.3.8-r4] 0 kB
[ebuild U ] dev-libs/gmp-4.2.1 [4.1.4] USE="-doc% -nocxx% (-debug%)" 1,685 kB
[ebuild N ] dev-libs/mpfr-2.2.0_p10 738 kB
[ebuild N ] virtual/libiconv-0 0 kB
[ebuild NS ] sys-devel/gcc-4.1.1-r1 USE="fortran nls (-altivec) -bootstrap -build -doc -gcj -gtk (-hardened) -ip28 -ip32r10k -mudflap (-multilib) -multislot (-n32) (-n64) -nocxx -objc -objc++ -objc-gc -test -vanilla" 38,320 kB
[ebuild N ] sys-libs/timezone-data-2006o USE="nls" 336 kB
[ebuild U ] sys-libs/glibc-2.4-r4 [2.3.4.20040808-r1] USE="nls nptl* nptlonly%* -build -glibc-compat20% -glibc-omitfp% -hardened (-multilib) -profile% (-selinux) (-debug%) (-erandom%) (-pic%) (-userlocales%*)" 15,760 kB

Total size of downloads: 110,656 kB
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Thu Feb 08, 2007 2:53 pm    Post subject: Reply with quote

kaprino wrote:
[ebuild U ] sys-kernel/linux-headers-2.6.17-r1 [2.4.21-r1]

That does not look like a safe upgrade - kernel 2.6 is quite different to 2.4 :wink:
Back to top
View user's profile Send private message
Pasketti
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 108
Location: Austin, Texas

PostPosted: Thu Feb 08, 2007 11:29 pm    Post subject: Reply with quote

It may be worthwhile to just download the timezone-data (emerge --fetch-only), extract the timezone file for your local time, and replace it manually.

I didn't get much farther than finding out that the "zic" command was the one to do that, but didn't actually get to that point myself.
Back to top
View user's profile Send private message
kaprino
n00b
n00b


Joined: 07 Feb 2007
Posts: 8

PostPosted: Fri Feb 09, 2007 12:46 am    Post subject: Reply with quote

Is it safe just to copy the /etc/localtime? I'm running an old version of glibc before the seperation. Would cause any conflicts or system to be unstable without really upgrading?

Thanks,
Kap
Back to top
View user's profile Send private message
eno2001
Tux's lil' helper
Tux's lil' helper


Joined: 20 Oct 2006
Posts: 136

PostPosted: Fri Feb 09, 2007 5:04 pm    Post subject: What Version of glibc? Reply with quote

I see a lot of mention of the timezone data being split out of glibc after a certain version, but the version is never mentioned. Most of my boxes are on x86, so I imagine that there is a specific version of glibc that I should be above. What version is that?
Back to top
View user's profile Send private message
Pasketti
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 108
Location: Austin, Texas

PostPosted: Fri Feb 09, 2007 7:09 pm    Post subject: Reply with quote

Coincidentally, I found some instructions here ( http://community.livejournal.com/linux/1588429.html ) to fix this manually.

Here they are:

Quote:
Don't know if this was mentioned in the past about the changes to daylight savings time (DST) that takes effect this year, so I thought I'd be kind and share how to do this by hand. Just in case anyone here has a unsupported system, or their version of Linux has reached it's EOL.

Most of my personal boxes and a majority where I work have patches available, but a couple I use do not. My example was done on a SUN Ultra2 running Debian "Woody" 3.0 (running 3.0 being a relative term, as I've since upgraded the kernel and several other packages manually), but this should work on just about any Linux setup. I more or less followed this guide ( http://www.cs.cmu.edu/~help/dst/solaris_and_linux_systems.html ) to do the updates.

The old timezone database had these as the old entries for when DST would kick-in. Note that April 1st is listed as the start and October 28th is the end. The new change to DST should read March 11th and November 4th respectively:

user@host:~> /usr/bin/zdump -v /usr/share/zoneinfo/US/Central |grep 2007
/usr/share/zoneinfo/US/Central Sun Apr 1 07:59:59 2007 UTC = Sun Apr 1 01:59:59 2007 CST isdst=0 gmtoff=-21600
/usr/share/zoneinfo/US/Central Sun Apr 1 08:00:00 2007 UTC = Sun Apr 1 03:00:00 2007 CDT isdst=1 gmtoff=-18000
/usr/share/zoneinfo/US/Central Sun Oct 28 06:59:59 2007 UTC = Sun Oct 28 01:59:59 2007 CDT isdst=1 gmtoff=-18000
/usr/share/zoneinfo/US/Central Sun Oct 28 07:00:00 2007 UTC = Sun Oct 28 01:00:00 2007 CST isdst=0 gmtoff=-21600


* 1) Get the updated timezone data. This file is what I used. ( ftp://elsie.nci.nih.gov/pub/tzdata2007a.tar.gz )
* 2) Unpack the GZip TAR archive. You will get several timezone files. The only one I was interested in was for North America (northamerica), so I more or less ignored the rest. Use whatever zone files apply to you.
* 3) Compile the timezone source file(s) with zic

root@host:~> /usr/bin/zic /path/to/zonefile


* 4) No command-line arguments will put it in /usr/share/zoneinfo/America, but you can specify a different location by the -d switch.
* 5) Change the /etc/localtime alias. Now on my old config, the correct timezone database was located in /usr/share/zoneinfo/US/Central. The new one is located in /usr/share/zoneinfo/America/Chicago. Just select the nearest city in which you live with the correct timezone.1

root@host:~> ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime


Once this is done your timezone should reflect the correct dates and times:

user@host:~> /usr/bin/zdump -v /etc/localtime |grep 2007
/etc/localtime Sun Mar 11 07:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 CST isdst=0 gmtoff=-21600
/etc/localtime Sun Mar 11 08:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 CDT isdst=1 gmtoff=-18000
/etc/localtime Sun Nov 4 06:59:59 2007 UTC = Sun Nov 4 01:59:59 2007 CDT isdst=1 gmtoff=-18000
/etc/localtime Sun Nov 4 07:00:00 2007 UTC = Sun Nov 4 01:00:00 2007 CST isdst=0 gmtoff=-21600


1: I also noticed that /usr/share/zoneinfo/CST6CDT was new and appears to contain the same file information as /usr/share/zoneinfo/America/Chicago, so one could probably just use that file.
Back to top
View user's profile Send private message
kaprino
n00b
n00b


Joined: 07 Feb 2007
Posts: 8

PostPosted: Sun Feb 11, 2007 11:29 pm    Post subject: Reply with quote

Thanks Pasketti,
YOu are a savior!! Will test it out on a non-critical system. before I try to patch on a production mail server. If anyone attempted this before please let me know if it was a sucesss.

Kap
Back to top
View user's profile Send private message
bombcar
Guru
Guru


Joined: 08 Apr 2003
Posts: 451
Location: Wisconsin

PostPosted: Fri Feb 16, 2007 6:21 pm    Post subject: Reply with quote

I found that my timezone was off, because I like to pick "Tijuana" instead of "Los Angeles" - but Mexico isn't changing the DST it looks like.

A quick

Code:

rm localtime
ln -s /usr/share/zoneinfo/America/Los_Angeles localtime


and all is happy.
Back to top
View user's profile Send private message
Garth
n00b
n00b


Joined: 21 Jan 2004
Posts: 35
Location: Michigan

PostPosted: Mon Feb 19, 2007 4:52 pm    Post subject: Reply with quote

Excellent post! Pasketti, your instructions worked like a charm to do this change manually. Note however that the file sourced here:
Quote:

* 1) Get the updated timezone data. This file is what I used. ( ftp://elsie.nci.nih.gov/pub/tzdata2007a.tar.gz )


has now changed to tzdata2007b.tar.gz. You'll find the latest in that FTP directory.


This should be posted on Tips & Tricks board!
_________________
Garth
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum