Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Origin of "Mon Jan 2 15:04:05 MST 2006" in golang

Tags:

time

go

In golang documentation, it is stated that :

These are predefined layouts for use in Time.Format and Time.Parse. The reference time used in the layouts is:

Mon Jan 2 15:04:05 MST 2006

which is Unix time 1136239445

What is the origin of this specific date ?

like image 346
guigui42 Avatar asked Dec 11 '13 21:12

guigui42


2 Answers

That's explained immediately after the section you quoted:

Since MST is GMT-0700, the reference time can be thought of as

01/02 03:04:05PM '06 -0700

It's a simple increasing sequence: 01 02 03 04 05 (PM) 06 07.

Using 03:04 PM rather than 03:04 AM makes it possible to show the two time representations 15:04 and 03:04PM more clearly (this is speculation on my part).

like image 195
Keith Thompson Avatar answered Sep 19 '22 03:09

Keith Thompson


It is just the numbers 1 2 3 4 5 6 7

1: month (January, Jan, 01, etc)

2: day

3: hour (15 is 3pm on a 24 hour clock)

4: minute

5: second

6: year (2006)

7: timezone (GMT-7 is MST)

like image 37
Stephen Weinberg Avatar answered Sep 23 '22 03:09

Stephen Weinberg