One thing you could try is to use two ints. One to represent seconds and 
the other nanoseconds. This is what protobuf 
does: https://github.com/golang/protobuf/blob/master/ptypes/timestamp.go.

An ISO8601 string works too.

On Monday, October 10, 2016 at 11:22:48 PM UTC-4, bsr wrote:
>
> Hello,
>
> I store all time values in UTC, and since it runs on google app engine, 
> the precision might be in microseconds.
> https://github.com/golang/appengine/blob/master/datastore/save.go#L21
>
> I want to display this time in client side with moment.js. But, javascript 
> doesn't support int64, so how should I send the time value (which is an 
> int64 at microseconds precision) to client. moment only supports time at 
> milliseconds 
> precision 
> <http://momentjs.com/docs/#/parsing/unix-timestamp-milliseconds/>. But, I 
> am not sure what is the best way to convert int64 to javascript number 
> <http://ecma262-5.com/ELS5_HTML.htm#Section_8.5>(it is ok to lose 
> precision to milliseconds).
>
> Thank you,
> bsr.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to