Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Makefile date command error on OSX #1061

Merged
merged 1 commit into from Sep 19, 2012
Merged

fix Makefile date command error on OSX #1061

merged 1 commit into from Sep 19, 2012

Conversation

copperlight
Copy link
Contributor

$ echo $GIT_DATE
2012-09-18 21:34:55 -0400

# broken form #1 -- "--date" option not supported

$ date --date="$(GIT_DATE)" +%Y%m%d%H%M
-bash: GIT_DATE: command not found
date: illegal option -- -
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... 
            [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]

# broken form #2 -- lowercase "s", unintended output

$ date -j -f "%Y-%m-%d %H:%M:%s" "$GIT_DATE" +%Y%m%d%H%M
Warning: Ignoring 6 extraneous characters in date string ( -0400)
196912311900

# correct form, with extra character warning

$ date -j -f "%Y-%m-%d %H:%M:%S" "$GIT_DATE" +%Y%m%d%H%M
Warning: Ignoring 6 extraneous characters in date string ( -0400)
201209182134

mpdehaan added a commit that referenced this pull request Sep 19, 2012
fix Makefile date command error on OSX
@mpdehaan mpdehaan merged commit e039d88 into ansible:devel Sep 19, 2012
@mpdehaan
Copy link
Contributor

merged, thanks

@ansible ansible locked and limited conversation to collaborators Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants