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]

RE: Cygwin date displays only GMT on Win7


Siv wrote:
> 
> date --date='TZ="ANYTHING" isn't working as expected
> Thanx. Anyway the last 2 cmds worked :
> 
> date                                      Wed, Jul 08, 2015  2:03:12 PM
> date -u                                   Wed, Jul 08, 2015  2:03:13 PM
> date --date='TZ="Asia/Delhi"'             Wed, Jul 08, 2015 12:00:00 AM
> date --date='TZ="Asia/Calcutta"'          Tue, Jul 07, 2015  6:30:00 PM
> date --date='TZ="Asia/Kolkata"'           Tue, Jul 07, 2015  6:30:00 PM
> TZ=Asia/Delhi date                        Wed, Jul 08, 2015  2:03:14 PM
> TZ=Asia/Kolkata date                      Wed, Jul 08, 2015  7:33:15 PM
> TZ=Asia/Calcutta date                     Wed, Jul 08, 2015  7:33:15 PM
> 

As expected?? 
Where did you get this --date='TZ=..." syntax?? Not anywhere I could find.

--date=STRING

Read the man page.

STRING works like this:

$ date
Wed Jul  8 16:38:44 EDT 2015
$ date --date=Thursday
Thu Jul  9 00:00:00 EDT 2015
$ date --date="last Monday"
Mon Jul  6 00:00:00 EDT 2015
$ date --date="25 dec 2016"
Sun Dec 25 00:00:00 EST 2016
$

--Ken Nellis

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