This is the mail archive of the
mailing list for the Cygwin project.
Re: strange delay in date?
- From: Marcos Lorenzo de Santiago <marcos at it dot uc3m dot es>
- To: Marcos Lorenzo de Santiago <marcos at it dot uc3m dot es>
- Cc: Markus Hoenicka <Markus dot Hoenicka at uth dot tmc dot edu>, cygwin at cygwin dot com
- Date: Thu, 11 Apr 2002 19:04:50 +0200 (CEST)
- Subject: Re: strange delay in date?
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!:
Thu Apr 11 17:00:15 2002
Thu Apr 11 19:00:35 2002
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html