This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Time-setting




> How can i achieve that the last-modification time a call "ls -la" produces
> is the same as the time my NT4.0 displays.
> For example: Current time is 15:40 then the file modification time is
> 13:40. My local time-zone is MET with daylight saving.
>
> Or with other words: How to achieve that cygwin uses my Windows-NT40 time?
>
> Thank you very much,
> Klaus

I am still trying to get cygwin installed, so I cannot tell you the cygwin
specific way.

On a standard Unix system, /etc/timezone sets the zone for the machine and users
can override with TZ environment variable.  Check for either of these in your
case because they may be incorrect.

It looks to me from your message that the MET timezone offset is being applied
to the NT local time which is already in the MET timezone.  I see a number of
choices for you without getting into something specific to cygwin:
   1) run cygwin as if it was GMT but it will really be MET
   2) run cygwin as a phony MET
   3) run NT as GMT and cygwin as MET
To get choice 2, you might try
   setenv TZ MET0MEET
(not that there is a zero in the middle of the above line).

The above variable tells Unix you are in a timezone called MET that is 0 hours
away from GMT and it supports a daylight savings time called MEET.  The only
problem I foresee is that cygwin may be too smart and use a real definition for
MET and MEET.  In that case you could try M.E.T.0M.E.E.T. and just have the
timezone show up in everything with periods to show it is a custom abbreviation.
Either way, mail will have a weird MET(+0) when it should be MET(+1).

If the TZ idea works for you, you can set /etc/timezone to have it be set for
all users.

Standard Unix tracks GMT internally and applies offsets later.  If the BIOS
under NT is tracking local time instead of GMT, then cygwin may be able to
figure this out and account for it.  Until I have a properly installed cygwin, I
won't know.

Bill Davis
wdavis01@harris.com

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]