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/