package main import ( "encoding/xml" "fmt" "io/ioutil" "net/http" "time" ) // (1)まずtime.Timeを含む構造体を作って type CustomTime struct { time.Time } // (2)UnmarshalXMLメソッドを実装する(xml.Unmarshalerインターフェースに定義されているメソッド) func (c *CustomTime) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { var v string d.DecodeElement(&v, &start) parse, err := time.Parse("2006-01-02 15:04:05 MST", fmt.Sprintf("%s JST"