3 ms·
The point is that in order to remember the order that the dates should be put in, you need to remember google's 'reference' layout .. Jan 2 15:04:05 2006 MST ..
by davisoneee 5y ago
The point is that in order to remember the order that the dates should be put in, you need to remember google's 'reference' layout .. Jan 2 15:04:05 2006 MST ... in other words:
1) Month, 2) Day of Month, 3) Hour, 4) Minute, 5) Second, 6) Year
So yes, you DO need to remember that the numbers are 'month/day' ordered, in order to, from memory, derive that it's 2006-01-02, and not 2006-02-01. With strftime, we effectively standardised "%Y-%m-%d"
- slrz 5y ago> google's 'reference' layout Nothing to do with Google here, by the way. It's just the default format of the Unix date command. So if you can't remember the order, just switch to your shell and run `LC_ALL=C date`.
- davisoneee 5y agoNot quite. With date, the timezone comes before the year. LC_ALL=C date => Sun Feb 13 14:27:18 GMT 2022