mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-17 04:30:03 +02:00
jsontime: use struct tags instead of setting default format.
Some other package (antelope-go in this case) also sets the default format and therefore it clashes with our code.
This commit is contained in:
parent
a2f8c3dc7c
commit
5b02dfa53f
2 changed files with 5 additions and 4 deletions
|
|
@ -18,7 +18,8 @@ func createCodec() message.Codec {
|
|||
|
||||
func init() {
|
||||
// Set timeformat used by SHIP api
|
||||
jsontime.SetDefaultTimeFormat("2006-01-02T15:04:05.000", time.UTC)
|
||||
jsontime.AddTimeFormatAlias("ship", "2006-01-02T15:04:05.000")
|
||||
jsontime.AddLocaleAlias("ship", time.UTC)
|
||||
|
||||
// Register the json codec.
|
||||
message.RegisterCodec("json", createCodec())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue