]> Cypherpunks repositories - gostls13.git/commitdiff
time: document that a marshaled time does not include location name
authorAgniva De Sarker <agnivade@yahoo.co.in>
Wed, 7 Nov 2018 14:26:30 +0000 (19:56 +0530)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 8 Nov 2018 05:41:45 +0000 (05:41 +0000)
Fixes #28421

Change-Id: I00878ec246d5249d910f2b57749f74cfc38dbec6
Reviewed-on: https://go-review.googlesource.com/c/148117
Reviewed-by: Rob Pike <r@golang.org>
src/time/time.go

index 5dc0d8a973da3256327a68a56bc05efdc5a79dff..59555c2d055f74c15c85cac190df0304778e7276 100644 (file)
@@ -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.