I need to parse a JavaScript formatted date which I obtain from calling new Date()
and looks like Sat Aug 27 2016 17:07:43 GMT+1000 (AEST)
.
I am then posting this as a string go my golang server where I need to parse it to be formatted the same as when calling time.Now()
which looks like 2016-08-30 14:05:31.563336601 +1000 AEST
.
This date is then stored in my database via gorm which is why I believe it needs to be in this format.
What is the best way of doing this?
Thanks.