Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Message-ID: Date: Fri, 5 Aug 2005 20:16:37 -0700 From: Joshua Daniel Franklin To: cygwin AT cygwin DOT com Subject: Re: Timezone names In-Reply-To: <42F22878.7060406@hones.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline References: <42F22878 DOT 7060406 AT hones DOT org DOT uk> X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id j763GoRP020322 On 8/4/05, Cliff Hones wrote: > I was curious as to why, under Cygwin, the default UK timezone > names (eg as displayed by "date") are different from the standard > names. [Standard UK names are GMT and BST, while Cygwin displays > GMTST and GMTDT.] So I did some source digging. Forgive me if the > following info is already readily available - but I couldn't find > it. Note that the Cygwin FAQ admits to being out of date: > http://cygwin.com/faq/faq_3.html#SEC85 Thanks, Cliff! Do you mind if I use this for the new FAQ text? > Cygwin does not use the Newlib version of tzset - there is a > Cygwin-specific implementation in localtime.cc. Unlike the > Newlib tzset, if environment TZ is not set, the Cygwin version > uses Windows API GetTimeZoneInformation. The timezone names > as seen by Cygwin are set using just the the capital letters in > the Windows timezone names (which, for the UK, are "GMT Standard Time" > and "GMT Daylight Time"). > > Of course, this affets other timezones too; most US zones translate > to their standard names, but Central America will generate CAST/CADT > rather than CST/CDT. > > To get the more standard names, one can, of course, set the > TZ environment variable explicitly (eg to "GMT0BST"). There is > logic to complement the TZ setting info with default info from > built in posixrules, but it's not clear to me if this will set the > daylight saving on/off points correctly. An alternative solution, > which will use the Windows daylight saving info as before is to > update the Windows timezone database directly. I believe there is > a "tzedit" tool to do this in Windows resource kits, but it is easy > to do using the registry [ok, I know this is frowned on]. The timezone > names (in NT/2K/XP) are in > HKLM\Software\Microsoft\Windows NT\Current Version\TimeZones\ > (eg ..\GMT Standard Time for UK). > The keys "Std" and "Dlt" specify the zone names - I changed mine to > be "Greenwich Mean Time" and "British Summer Time". After the change, > to make it effective, use the Windows "Adjust Date/Time" dialog to reselect > your timezone. > > OBLIGATORY WARNING - Do not modify registry settings unless you are confident > you know what you are doing, and know how to restore previous settings if > your system subsequently malfunctions. > > A possibly better solution, one day, would be for the "localtime" implementation > to be implemented for Cygwin, with zone files in /usr/share/zoneinfo. > > -- Cliff > > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Problem reports: http://cygwin.com/problems.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/