Editing 1467: Email
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 8: | Line 8: | ||
==Explanation== | ==Explanation== | ||
− | + | Despite being in popular use since 1998 when free email providers appeared and having existed since before 1982 when {{w|SMTP}} was established, [[Beret Guy]] apparently doesn't understand what {{w|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 {{w|voicemail}}, which she implies is not worth ever checking. | |
− | + | Beret Guy offers two alternatives: {{w|Fax}} and {{w|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 {{w|sexting}}), implying that many people send sexual content via fax, a technology that predates SMTP by more than a decade. | |
− | + | 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 (eg. 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, {{w|UTC}}). In order 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 [[1179: ISO 8601|ISO 8601]] format as a universal standard. | |
− | |||
− | 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 ( | ||
− | |||
− | |||
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: | 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: | ||
Line 27: | Line 23: | ||
*%s = Unix timestamp (1420001642 seconds since epoch) | *%s = Unix timestamp (1420001642 seconds since epoch) | ||
− | The "%s" token shows us the actual {{w|Unix time|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 | + | The "%s" token shows us the actual {{w|Unix time|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, which is evidently at least 5 hours off from UTC. In Pacific Standard Time, for example, the time was 20:54:02, or just before 9:00 PM, 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" | + | 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" or "2014-12-30 21:54:02" if the computer is configured for the PST time zone. 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). | Randall previously addressed date/time formatting in [[1179: ISO 8601]] and [[1340: Unique Date]] (the latter of which uses a formatting string correctly). | ||
− | |||
− | |||
==Transcript== | ==Transcript== | ||
Line 56: | Line 50: | ||
==Trivia== | ==Trivia== | ||
− | The Unix timestamp is a standard method of | + | The Unix timestamp is a standard method of describing the absolute number of seconds that have elapsed since "epoch", defined as midnight on January 1, 1970, Coordinated Universal Time (UTC). Epoch, in {{w|ISO-8601}} format, is "1970-01-01T00:00:00Z", where Z indicates UTC. |
− | The timestamp in this comic's title text (1420001642) is 1,420,001,642 seconds since epoch. | + | The timestamp in this comic's title text (1420001642) is 1,420,001,642 seconds since epoch. To convert that into a human-readable time: |
*Years since 1970 = 1,420,001,642 seconds / 60 seconds per minute / 60 minutes per hour / 24 hours per day / 365.25 days per year | *Years since 1970 = 1,420,001,642 seconds / 60 seconds per minute / 60 minutes per hour / 24 hours per day / 365.25 days per year | ||
**This yields 44 years plus 31,467,242 seconds. | **This yields 44 years plus 31,467,242 seconds. | ||
**The year for the timestamp is 1970 + 44 years = '''2014'''. | **The year for the timestamp is 1970 + 44 years = '''2014'''. | ||
− | ***Note: The year calculation specifies 365.25 days per year to account for {{w|leap year|leap years}} (every fourth year adds an extra day) | + | ***Note: The year calculation specifies 365.25 days per year to account for {{w|leap year|leap years}} (every fourth year adds an extra day). |
*Days since start of year = 31,467,242 seconds / 60 seconds per minute / 60 minutes per hour / 24 hours per day | *Days since start of year = 31,467,242 seconds / 60 seconds per minute / 60 minutes per hour / 24 hours per day | ||
− | **This yields 364 days plus 17,642 seconds | + | **This yields 364 days plus 17,642 seconds. |
**The 365th day of a non-leap year is '''December 31'''. December is the '''12th month''' in the Gregorian calendar. | **The 365th day of a non-leap year is '''December 31'''. December is the '''12th month''' in the Gregorian calendar. | ||
*The remaining seconds can be converted into a time: | *The remaining seconds can be converted into a time: | ||
Line 74: | Line 68: | ||
{{comic discussion}} | {{comic discussion}} | ||
− | |||
− | |||
[[Category:Comics featuring Beret Guy]] | [[Category:Comics featuring Beret Guy]] | ||
[[Category:Comics featuring Megan]] | [[Category:Comics featuring Megan]] | ||
− |