My New Year's resolution for 2014-54-12/30/14 Dec:12:1420001642 is to learn these stupid time formatting strings.
A New Year comic, where Megan asks Beret Guy if he has any New Year's resolutions, and even though this is just before the New Year of 2015, he resolves to find out what an email is!
Despite being in popular use since 1998 when free email providers appeared and having existed since before 1982 when SMTP was established, Beret Guy apparently doesn't understand what email is, even though he maintains a web page that includes his email address. Megan wonders how else he expects electronic messages to be sent. She explains that one must check email regularly, making a slight at voicemail, which she implies is not worth ever checking.
Beret Guy offers two alternatives: Fax and Snapchat. Megan refers to Snapchat as "the naked pic thing", calling to mind how many of its users send naked pictures of themselves over the Internet. Beret Guy replies that people use fax machines for more than just "faxting" (a made-up term similar to sexting), implying not only that many people send sexual content via fax, but also that he associates fax machines with such acts rather than Snapchat, despite faxing being a technology that predates SMTP by more than a century. Beret Guy knows what a fax is, which implies he is very behind in the technology world, so it makes sense he doesn't know what email is. But he also knows what Snapchat is, which was very popular around the time of this comic. Either Beret Guy heard about it in a similar way to email, or he definitely knows what it is and/or uses it. What's strange is that if Beret Guy knows what Snapchat is, he should know what email is as well, since you need to provide an email account in order to create a Snapchat account.
The title text, which could be Randall's New Year's resolution for 2015, refers to various date/time formats. In programming, a point in time (e.g. the current system time) is usually stored and processed as a single number that represents the count of seconds that have elapsed since a given starting time known as "epoch" (the Unix standard epoch is January 1, 1970 at midnight, UTC). To make sense to people, this number must be converted to a human-readable format, but programmers must choose a format that best meets the needs of their users. This can be a complicated problem to solve, given that there are many different standard formats for different regions, different levels of precision for different applications, and differences between "universal time" and a user's local time zone. Randall has previously advocated for widespread adoption of the ISO 8601 format as a universal standard.
The title text also probably references a Twitter outage that took place on December 29, which was blamed on an error in a date format string.
Most programming languages provide functions to create a custom date-format string using "tokens" that represent different parts of the date/time. Here, Randall appears to have used one of these functions with the string "%Y-%M-%D %h:%m:%s", which looks like it should produce a date and time as "Year-Month-Day Hour:Minute:Second". However, he used the wrong tokens for this:
- %Y = 4-digit year (2014)
- %M = minute (54)
- %D expands to %m/%d/%y, which is "month/day/2-digit year" in the user's local time zone rather than UTC. ("12/30/14" - see below)
- %h = abbreviated month name ("Dec")
- %m = 2-digit month (12)
- %s = Unix timestamp (1420001642 seconds since epoch)
The "%s" token shows us the actual Unix timestamp used (1420001642), which corresponds to 2014-12-31 at 04:54:02 UTC. The format string shown above thus yields "2014-54-12/30/14 Dec:12:1420001642". Note that the middle portion of this string shows "12/30" instead of "12/31" - this is due to the %D token expressing the date in Randall's local time zone (Eastern Standard Time, or EST), which is 5 hours before UTC. The time there was 23:54:02, or just before midnight, on the previous day.
The correct format string for Randall's apparent desired result is "%Y-%m-%d %H:%M:%S", which gives the string "2014-12-31 04:54:02" (UTC) or "2014-12-30 23:54:02" (EST). Given the similarity between Randall's string and the correct one, it is easy to see how this type of formatting is confusing and often frustrating for programmers - particularly those not intimately familiar with these functions.
Randall previously addressed date/time formatting in 1179: ISO 8601 and 1340: Unique Date (the latter of which uses a formatting string correctly).
This was the second comic in a row with Megan holding a smartphone, the first being 1466: Phone Checking. The comic before that one was also about smartphones: 1465: xkcd Phone 2.