How to write the date
-
Found this while browsing a project on GitHub (http://github.com/gustavosbarreto/antico): timestamps are written in the strangest format I've ever seen:
Month Day Hour:Minute:Second Timezone Year
eg. May 05 04:43:48 -0700 2010
-
C:\Documents and Settings>perl -e "print scalar localtime()"
Fri Jun 11 04:23:11 2010Apparently, this is an accepted way of timekeeping.
-
@b_redeker said:
Apparently, this is an accepted way of timekeeping.
Yes, I've seen that format often, in many BBS and blogging software flavours, it's how message/comment times/dates are displayed.
-
@Cad Delworth said:
Filed under: non-WTF
Well, this is only a non-WTF in the sense that rhyming "rough" with "cuff" and "though" with "Joe" is not a WTF, or starting an array count at 0, or shooting heroin into your veins.
-
Perl this!
@b_redeker said:
C:\Documents and Settings>perl -e "print scalar localtime()"
Fri Jun 11 04:23:11 2010TRWTF == perl || TRWTF == cmd.exe
-
It's ballistic.
-
@b_redeker said:
C:\Documents and Settings>perl -e "print scalar localtime()"
Fri Jun 11 04:23:11 2010Apparently, this is an accepted way of timekeeping.
I don't see a timezone offset in your example, and I certainly don't see it sitting between the time and the year.
-
And then there's the UNIX 'date' command, which defaults to the format "mmddHHMM[[cc]yy][.SS]" when setting the clock - month, day, hours, minutes, YEAR, and finally seconds. Interestingly enough, AIX expects the seconds to come after the minutes where you'd expect them to be (though for really old versions, like 5.1, you can only specify seconds with a 2-digit year), but it does have the strange behavior of leaving the seconds [i]unmodified[/i] if you don't specify them (all of the other platforms I deal with, seconds get reset to 0). Oh, and HP-UX, which doesn't even allow you to specify the seconds in the first place.
-
I don't see a timezone offset in your example, and I certainly don't see it sitting between the time and the year.
That was a nice little extra, but for me time inside the date is already a WTF in itself
-
Has anyone seen my mug?