X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_05,SPF_HELO_PASS,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Message-ID: <19340.20849.575807.106916@irtcluster02.cs.columbia.edu> Date: Mon, 1 Mar 2010 18:44:49 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit In-Reply-To: <6910a61003011115u626546ccqb8dbf7be0462af11@mail.gmail.com> References: <4B8A6E48 DOT 1090501 AT x-ray DOT at> <20100301092913 DOT GT5683 AT calimero DOT vinschen DOT de> <20100301104727 DOT GG6439 AT const DOT bordeaux DOT inria DOT fr> <6910a61003011115u626546ccqb8dbf7be0462af11 AT mail DOT gmail DOT com> To: Reini Urban , cygwin AT cygwin DOT com Subject: Re: TZ=CEST not detected From: lennox AT cs DOT columbia DOT edu Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com [Moving this reply to the cygwin list from cygwin-apps, where I'm not subscribed and so can't post, since it was only on the -apps list due to an autocomplete bug by the original poster in the first place.] Reini Urban writes: > 2010/3/1 Samuel Thibault: > > > > Apparently this one is valid and has a sane meaning: > > > > $ TZ=CET-1CEST date > > lundi 1 mars 2010, 11:46:42 (UTC+0100) > > $ TZ=CET-1CEST date -d 20090701 > > mercredi 1 juillet 2009, 00:00:00 (UTC+0200) > > > > i.e. it switches between CET and CEST as appropriate. > Great, thanks! Actually, this is almost certainly not what you want. "CET-1CEST" means "A time zone one hour east of UTC, named 'CET', with a one-hour Summer Time using the default rules, named 'CEST'." Unfortunately, the default rules are the U.S. rules. Thus: $ TZ=CET-1CEST date -d "15 mar 2010" Mon Mar 15 00:00:00 CEST 2010 The U.S. switches to daylight-saving time on Sunday, 14 March this year, whereas the E.U. switches to summer time on Sunday, 28 March. The "CET" zone actually does the right thing for summer time, going forward (using the EU rules): $ TZ=CET date -d "15 mar 2010" Mon Mar 15 00:00:00 CET 2010 $ TZ=CET date -d "29 mar 2010" Mon Mar 29 00:00:00 CEST 2010 Historical times prior to the adoption of E.U. rules (in 1977 or thereabouts) may be incorrect, however. To pick the proper time zone name for your region, run the /usr/sbin/tzselect tool. Based on your e-mail address, I'd suspect you want "Europe/Vienna". -- Jonathan Lennox lennox at cs dot columbia dot edu -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple