This is the mail archive of the cygwin 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]
Other format: [Raw text]

Getting different times with or without --login


Hi,

I noticed that I'm getting different times from the command line when use
--login or not.

Here's a simple test.

1. Start from a Windows command prompt and start bash with "bash --login". In
   this case, I can see that the TZ variable is set to "Europe/Brussels".

   If I run date, I get "Wed, Oct 09, 2013  5:00:52 PM", while running the
   following command "emacs -Q --batch --eval '(message "%s"
   (format-time-string "%H:%M"))'" returns "16:00" (I get a difference of one
   hour).

2. Start from a Windows command prompt and start bash with "bash". In this
   case, the TZ variable is not set (no profile loaded).

   In this case, the 2 previous commands return the same correct time.

Note that the "date" command returns the correct time in any case (with and
without --login), while the emacs command returns the correct time only when
--login is not used (I'm using a Windows version of Emacs, 24.3). I have no
issue when using the Cygwin version of Emacs.

I don't understand what's wrong in my configuration. Everything should be fine
even when using the "bash --login" command to start Cygwin (this is the what
the standard cygwin.bat batch file does).

Any hint is welcome.

Thanks a lot.

 Francesco

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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