diff options
| author | Agniva De Sarker <agnivade@yahoo.co.in> | 2018-11-07 19:56:30 +0530 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2018-11-08 05:41:45 +0000 |
| commit | d258bac41c05bfa320b1d124a8592772e235a48e (patch) | |
| tree | 85ef3b4413b86b120f91d0d942487e1b1fa6d097 /src | |
| parent | c9762b8a7ec852d96ea040c28c5f65b1104ec844 (diff) | |
| download | go-d258bac41c05bfa320b1d124a8592772e235a48e.tar.xz | |
time: document that a marshaled time does not include location name
Fixes #28421
Change-Id: I00878ec246d5249d910f2b57749f74cfc38dbec6
Reviewed-on: https://go-review.googlesource.com/c/148117
Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/time/time.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/time/time.go b/src/time/time.go index 5dc0d8a973..59555c2d05 100644 --- a/src/time/time.go +++ b/src/time/time.go @@ -105,6 +105,10 @@ import ( // change the instant in time being denoted and therefore does not affect the // computations described in earlier paragraphs. // +// Representations of a Time value saved by the GobEncode, MarshalBinary +// MarshalJSON, and MarshalText methods store the Time.Location's offset, but not +// the location name. They therefore lose information about Daylight Saving Time. +// // In addition to the required “wall clock” reading, a Time may contain an optional // reading of the current process's monotonic clock, to provide additional precision // for comparison or subtraction. |
