I am generating string using date +"%Y%m%d%H" and reading the same string to convert back as date. somehow reverse is not working. and %Y is treated as first six characters
# date +"%Y%m%d%H"
2017030216
# date -d 2017030215 +%Y
201703
# date -d 2017030215 +%m
02
Why doesn't this return 2017?