]> Cypherpunks repositories - gostls13.git/commit
time: clean up MarshalJSON, add RFC3339 method
authorRuss Cox <rsc@golang.org>
Wed, 8 Feb 2012 04:37:25 +0000 (23:37 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 8 Feb 2012 04:37:25 +0000 (23:37 -0500)
commit1d8250c8b0987bd67e5253803e50bbd7997a3d23
tree1c1178775fd161d58714ea9404511f88c7a373dd
parent3ee208533e4da4e2f642c51d3aa753be49c6180b
time: clean up MarshalJSON, add RFC3339 method
encoding/xml: handle time.Time as recognized type

The long term plan is to define an interface that time.Time
can implement and that encoding/xml can call, but we are
not going to try to define that interface before Go 1.
Instead, special-case time.Time in package xml, because
it is such a fundamental type, as a stop-gap.
The eventual methods will behave this way.

Fixes #2793.

R=golang-dev, r, r, n13m3y3r
CC=golang-dev
https://golang.org/cl/5634051
src/pkg/encoding/xml/atom_test.go
src/pkg/encoding/xml/marshal.go
src/pkg/encoding/xml/marshal_test.go
src/pkg/encoding/xml/read.go
src/pkg/encoding/xml/read_test.go
src/pkg/time/format.go
src/pkg/time/time.go
src/pkg/time/time_test.go