mirror of
https://github.com/golang/go
synced 2024-11-26 14:36:52 -07:00
doc/go1.17: document time changes for Go1.17
Documents the newly implemented changes of - Time.IsDST() method - Addition of Time.UnixMilli, Time.UnixMicro and to-Time helpers UnixMicro, UnixMilli methods - Addition of comma "," support as separator for fraction seconds For #44513 Fixes #46026 Change-Id: Ib8d3449d3b061f013112d33362b50e68ad6ddffa Reviewed-on: https://go-review.googlesource.com/c/go/+/317913 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
d743e67e06
commit
1c6a2ea2ea
@ -689,15 +689,26 @@ Do not send CLs removing the interior tags from such phrases.
|
||||
</p>
|
||||
|
||||
<p><!-- CL 264077 -->
|
||||
TODO: <a href="https://golang.org/cl/264077">https://golang.org/cl/264077</a>: add Time.IsDST() to check if its Location is in Daylight Savings Time
|
||||
The new <a href="/pkg/time/#Time.IsDST"><code>Time.IsDST</code></a> method can be used to check whether the time
|
||||
is in Daylight Savings Time in its configured location.
|
||||
</p>
|
||||
|
||||
<p><!-- CL 293349 -->
|
||||
TODO: <a href="https://golang.org/cl/293349">https://golang.org/cl/293349</a>: add Time.Unix{Milli,Micro} and to-Time helpers UnixMicro, UnixMilli
|
||||
The new <a href="/pkg/time/#Time.UnixMilli"><code>Time.UnixMilli</code></a> and
|
||||
<a href="/pkg/time/#Time.UnixMicro"><code>Time.UnixMicro</code></a> methods return the number of milliseconds and
|
||||
microseconds elapsed since January 1, 1970 UTC respectively.<br>
|
||||
The new <code>UnixMilli</code> and <code>UnixMicro</code> functions return local Time corresponding to given
|
||||
Unix time.
|
||||
</p>
|
||||
|
||||
<p><!-- CL 300996 -->
|
||||
TODO: <a href="https://golang.org/cl/300996">https://golang.org/cl/300996</a>: support "," as separator for fractional seconds
|
||||
The package now accepts comma "," as a separator for fractional seconds when parsing and formatting time.
|
||||
The following time formats are now accepted:
|
||||
<ul>
|
||||
<li>2006-01-02 14:06:03,999999999 -0700 MST</li>
|
||||
<li>Mon Jan _2 14:06:03,120007 2006</li>
|
||||
<li>Mon Jan 2 14:06:03,120007 2006</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p><!-- CL 320252 -->
|
||||
|
Loading…
Reference in New Issue
Block a user