package tools import ( "gitlab.wodcloud.com/apaas/apaas-meshproxy/src/config" "time" ) type JsonTime time.Time func (j JsonTime) MarshalJSON() ([]byte, error) { return []byte(`"` + time.Time(j).Format(config.LocalDateTimeFormat) + `"`), nil } type JsonHour time.Time func (j JsonHour) MarshalJSON() ([]byte, error) { return []byte(`"` + time.Time(j).Format(config.LocalTimeFormat) + `"`), nil } type JsonDate time.Time func (j JsonDate) MarshalJSON() ([]byte, error) { return []byte(`"` + time.Time(j).Format(config.LocalDateFormat) + `"`), nil }