This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Cygwin date displays only GMT on Win7
- From: "Nellis, Kenneth" <Kenneth dot Nellis at xerox dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Wed, 8 Jul 2015 20:41:38 +0000
- Subject: RE: Cygwin date displays only GMT on Win7
- Authentication-results: sourceware.org; auth=none
- References: <loom dot 20150708T155234-134 at post dot gmane dot org>
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