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 X-Authentication-Warning: varpa.it.uc3m.es: marcos owned process doing -bs Date: Thu, 11 Apr 2002 19:04:50 +0200 (CEST) From: Marcos Lorenzo de Santiago X-Sender: marcos AT varpa DOT it DOT uc3m DOT es To: Marcos Lorenzo de Santiago Cc: Markus Hoenicka , cygwin AT cygwin DOT com Subject: Re: strange delay in date? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 11 Apr 2002, Marcos Lorenzo de Santiago wrote: > On Thu, 11 Apr 2002, Markus Hoenicka wrote: > > > Upon re-reading my reply I noticed that it was too terse. date shows > > UTC in your case because you did not set up your timezone > > correctly. If you do, date will show your local time, date -u will > > show UTC. > > > > In my case, I set TZ to CST6CDT, which means time zone is CST, I'm 6 h > > west of UTC, and my daylight savings time zone is CDT > > > > regards, > > Markus > > Thanks a lot now I know what is the problem, but I don't know how to > resolve it. I know how to do it in linux, but not in cygwin (arrgh! :) OK! I answer myself: setting the TZ variable: $ export TZ=CST-1CDT; date Thu Apr 11 18:55:26 2002 $ date -u Thu Apr 11 16:55:29 2002 How can I set this variable as the default? In /etc/profile?... let's try... yes! it works although I don't get bash hour prompt to work: 17:01:07 ~$ date Thu Apr 11 19:01:10 2002 there's still a delay of 2 hours between the two dates. Maybe there's any other configuration for this... And now I want this command (date) to work from cmd.exe too (not only from bash.exe): I guessed that probably setting a variable TZ to the timezone in cmd.exe would work and so it does!: C:\>c:\cygwin\bin\date Thu Apr 11 17:00:15 2002 C:\>set TZ=CST-1CDT C:\>c:\cygwin\bin\date Thu Apr 11 19:00:35 2002 That's it! m4c. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/