In golang I have not found any way to convert 12 hour format string time to 24 hour format as below:
07:05:45PM to 19:05:45
I have tried below using layout
layout := "Mon Jan 2 15:04:05 -0700 MST 2006" /* * Write your code here. */ //layout := "3:04PM" t,_ := time.Parse(layout,s) fmt.Println(t)
I have looked for answers similar to this but it is not helping everyone is using whole layout. I found answers in another language but not in go.