{"id":1876,"date":"2009-05-29T19:07:37","date_gmt":"2009-05-29T23:07:37","guid":{"rendered":"http:\/\/blogs.n1zyy.com\/n1zyy\/?page_id=1876"},"modified":"2009-05-29T19:07:37","modified_gmt":"2009-05-29T23:07:37","slug":"unix-timestamp-formats","status":"publish","type":"page","link":"https:\/\/blogs.n1zyy.com\/n1zyy\/unix-timestamp-formats\/","title":{"rendered":"UNIX Timestamp Formats"},"content":{"rendered":"<ul>\n    <li>This format is used all over the place: many programming language datestamps, bash, MySQL, most UNIX prompts&#8230;<\/li>\n    <li>This data is from the man page from strftime, distilled down to basics. This is intended as a cheat-sheet, not an extremely-accurate dissertation. Ergo:<\/li>\n    <li>Some entries (marked with an asterisk) have extremely specific and perhaps unconventional ways of being counted; there are several ways to determine the week of the month, for example. I don&#8217;t bother trying to explain them here, because I don&#8217;t care. If you do, check out the strftime man page.<\/li>\n    <li>Some examples are locale-specific. The examples are from a US English locale.<\/li>\n<\/ul>\n<table border=\"0\">\n<tbody>\n<tr>\n<th>Format<\/th>\n<th>Name<\/th>\n<th>Example(s)<\/th>\n<\/tr>\n<tr>\n<td>%A<\/td>\n<td>Full weekday name<\/td>\n<td>Monday<\/td>\n<\/tr>\n<tr>\n<td>%a<\/td>\n<td>Abbreviated weekday name<\/td>\n<td>Mon.<\/td>\n<\/tr>\n<tr>\n<td>%B<\/td>\n<td>Full month name<\/td>\n<td>January<\/td>\n<\/tr>\n<tr>\n<td>%b<\/td>\n<td>Abbreviated month name<\/td>\n<td>Jan.<\/td>\n<\/tr>\n<tr>\n<td>%C<\/td>\n<td>First two digits of year<\/td>\n<td>20 (for 2009)<\/td>\n<\/tr>\n<tr>\n<td>%c<\/td>\n<td>Time and date<\/td>\n<td>Fri May 29 18:42:15 2009<\/td>\n<\/tr>\n<tr>\n<td>%D<\/td>\n<td>Short for %m\/%d\/%y<\/td>\n<td>05\/29\/09<\/td>\n<\/tr>\n<tr>\n<td>%d<\/td>\n<td>Day of the month (leading zero if applicable)<\/td>\n<td>09 or 27<\/td>\n<\/tr>\n<tr>\n<td>%e<\/td>\n<td>Day of the month (no leading zero)<\/td>\n<td>9 or 27<\/td>\n<\/tr>\n<tr>\n<td>%F<\/td>\n<td>Short for %Y-%m-%d<\/td>\n<td>2009-05-29<\/td>\n<\/tr>\n<tr>\n<td>%G<\/td>\n<td>Full year* containing &#8220;the greater part of the week&#8221;<\/td>\n<td>2009<\/td>\n<\/tr>\n<tr>\n<td>%g<\/td>\n<td>Last two digits of %g<\/td>\n<td>09<\/td>\n<\/tr>\n<tr>\n<td>%H<\/td>\n<td>Hour, 24-hour format, leading zero if applicable<\/td>\n<td>17 or 09<\/td>\n<\/tr>\n<tr>\n<td>%h<\/td>\n<td>Same as %b: abbrev. month name<\/td>\n<td>Oct.<\/td>\n<\/tr>\n<tr>\n<td>%I<\/td>\n<td>Hour, 12-hour format<\/td>\n<td>11 or 07<\/td>\n<\/tr>\n<tr>\n<td>%j<\/td>\n<td>Day of the year<\/td>\n<td>365<\/td>\n<\/tr>\n<tr>\n<td>%k<\/td>\n<td>Hour, 24-hour format, without leading zero<\/td>\n<td>17 or 9<\/td>\n<\/tr>\n<tr>\n<td>%l<\/td>\n<td>Hour, 12-hour format, without leading zero<\/td>\n<td>11 or 7<\/td>\n<\/tr>\n<tr>\n<td>%M<\/td>\n<td>Minute, with leading zero if applicable<\/td>\n<td>57 or 05<\/td>\n<\/tr>\n<tr>\n<td>%m<\/td>\n<td>Month, with leading zero if applicable<\/td>\n<td>08<\/td>\n<\/tr>\n<tr>\n<td>%n<\/td>\n<td>Line break \/ newline (for formatting)<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>%p<\/td>\n<td>AM or PM<\/td>\n<td>AM<\/td>\n<\/tr>\n<tr>\n<td>%R<\/td>\n<td>Same as %H:%M<\/td>\n<td>18:53<\/td>\n<\/tr>\n<tr>\n<td>%r<\/td>\n<td>Same as %I:%M:%S %p<\/td>\n<td>06:53:43 PM<\/td>\n<\/tr>\n<tr>\n<td>%S<\/td>\n<td>Second, with leading zero<\/td>\n<td>07 or 59<\/td>\n<\/tr>\n<tr>\n<td>%s<\/td>\n<td>Number of seconds since epoch<\/td>\n<td>1243637689<\/td>\n<\/tr>\n<tr>\n<td>%T<\/td>\n<td>Same as %H:%M:%S<\/td>\n<td>18:55:09<\/td>\n<\/tr>\n<tr>\n<td>%t<\/td>\n<td>Tab (for formatting)<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>%U<\/td>\n<td>Week (number) of the year*<\/td>\n<td>51<\/td>\n<\/tr>\n<tr>\n<td>%v<\/td>\n<td>Same as %e-%b-%Y<\/td>\n<td>29-May-2009<\/td>\n<\/tr>\n<tr>\n<td>%W<\/td>\n<td>Week (number) of the year*<\/td>\n<td>21<\/td>\n<\/tr>\n<tr>\n<td>%w<\/td>\n<td>Day of the week. Caveat: 0-6 (Sun-Sat)<\/td>\n<td>6<\/td>\n<\/tr>\n<tr>\n<td>%X<\/td>\n<td>Time in local format<\/td>\n<td>19:00:08<\/td>\n<\/tr>\n<tr>\n<td>%x<\/td>\n<td>Date in local format<\/td>\n<td>05\/29\/2009<\/td>\n<\/tr>\n<tr>\n<td>%Y<\/td>\n<td>Full year<\/td>\n<td>2009<\/td>\n<\/tr>\n<tr>\n<td>%y<\/td>\n<td>Short year (last two digits)<\/td>\n<td>99<\/td>\n<\/tr>\n<tr>\n<td>%Z<\/td>\n<td>Time zone name<\/td>\n<td>EDT<\/td>\n<\/tr>\n<tr>\n<td>%z<\/td>\n<td>Time zone difference from UTC (-0400: behind 4 hours, 00 minutes)<\/td>\n<td>-0400<\/td>\n<\/tr>\n<tr>\n<td>%+<\/td>\n<td>Local date and time format<\/td>\n<td>Fri May 29 19:06:31 EDT 2009<\/td>\n<\/tr>\n<tr>\n<td>%%<\/td>\n<td>A literal percent sign<\/td>\n<td>%<\/td>\n<\/tr>\n<\/tbody><\/table>","protected":false},"excerpt":{"rendered":"<p>This format is used all over the place: many programming language datestamps, bash, MySQL, most UNIX prompts&#8230; This data is from the man page from strftime, distilled down to basics. This is intended as a cheat-sheet, not an extremely-accurate dissertation. &hellip; <a href=\"https:\/\/blogs.n1zyy.com\/n1zyy\/unix-timestamp-formats\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-1876","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/pages\/1876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/comments?post=1876"}],"version-history":[{"count":0,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/pages\/1876\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/media?parent=1876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}