* skrutsko via golang-nuts <[email protected]> [161207 08:30]:
> Hello
>
> I have a field in my text template: "start":"{{.Start.Format "Jan 02, 2006
> 15:04:05 UTC"}}"
>
> But, I want to have output as epoch time. E.g. 148110633400
>
> Could you please explain how to do this ? Thanks
Do you mean Unix time (seconds since Jan 1, 1970 UTC)? Try
"{{.Start.Unix}}"
Note that in your Format above, UTC should probably be MST to print the
time zone associated with Start. Also, I presume your code has the
double quotes properly escaped for their context, which does not appear
to be done above (though the context is not clear; a more complete
example would be more helpful).
...Marvin
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.