bash - Cygwin return different format of date for `date -u` command -
when execute date -u
command cygwin terminal / cygwin bash shell, returns output tue, jul 14, 2015 2:52:47 pm
but when executed bash
command command line, executed date -u
, returns output tue jul 14 14:52:27 utc 2015
i need command return output format: tue jul 14 14:52:27 utc 2015 (%a %b %d %h:%m%s %z %y)
why return different datetime format? how can change these same format?
path different cygwin terminal:
cygwin terminal: c:\cygwin\bin\mintty.exe -i /cygwin-terminal.ico - cygwin bash shell: c:\cygwin\cygwin.bat bash: c:\cygwin\bin\bash.exe
the date format depends on system's locale:
$ lc_all=it_it.utf8 date -u mar 14 lug 2015, 18.04.18, utc $ lc_all=posix date -u tue jul 14 18:04:29 utc 2015
if want consistent date
output, explicitly set system, user, script or date command use posix
locale.
Comments
Post a Comment