Data type for storing date time offset in golang

351 views
Skip to first unread message

Aishwarya

unread,
Mar 4, 2015, 6:40:17 AM3/4/15
to golan...@googlegroups.com
In my application i am receiving a JSON data which contains a data in date time offset format . I need to unmarshal it and store in the data base in the same date time offset format . So is there a data type available in go to declare a variable in tat format ????

C Banning

unread,
Mar 4, 2015, 7:54:39 AM3/4/15
to golan...@googlegroups.com

Kevin Malachowski

unread,
Mar 4, 2015, 5:32:58 PM3/4/15
to golan...@googlegroups.com
What does this format look like? An example would be nice.

If it is an offset between two absolute points in time why not just store it in a time.Duration? That would integrate well with the stdlib's time library for doing operations with this value.
Reply all
Reply to author
Forward
0 new messages