Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> By contrast, as soon as I learned the "trick" http://golang.org/pkg/time/#pkg-constants

Since MST is GMT-0700, the reference time can be thought of as 01/02 03:04:05PM '06 -0700

Such sadness. Using a reversed month/year date as a "reference" when we have ISO 8601. Much american-centrism.

Otherwise I like the trick, but I'm not sure it scales to locale-specific time formats (whereas strftime does a bit with %aAbBxX).



I tend to prefer ISO-style dates/times myself... and unless the date+time is tied to a location+event (and not always then), store/transmit as UTC. This leads to far fewer headaches in the long run.


The line right above that one is the first cited reference format:

    Mon Jan 2 15:04:05 MST 2006


I know, I'm talking about the mnemonic used to remember this date.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: