#Webserver HTML substitution, Passing time from golang to JS?

2 messages · Page 1 of 1 (latest)

cosmic idol
#

I am making a website that needs to fill data from a server backend. For text or numeric data this is no problem but timestamps are more troublesome. What is the best way I can pass a golang time.Time into a JS html template function, preferably without requiring parsing the text?

vast timber
#

can you just use the unix time