I am trying to get current date to display in zulu time.
This displays date in yyyy-MM-dd "dateAsserted": "{{ dateInZone "2006-01-02" (now) "UTC"}}"
but something like this breaks the template (using sprig function) "dateAsserted": "{{ dateInZone "2006-01-02T14:00:00.000Z" (now) "UTC" }}"
I am not keen on introducing another library like momentjs because I want to do this within the go template.
Also how do you prevent \ being added (escaped) in the go template if there is an &? This breaks json. I can’t add & either at the template complains.
Also how do you prevent \ being added (escaped) in the go template if there is an & ? This breaks json. I can’t add & either at the template complain
Using “replace” might work. Are you able to provide a sample/more context? input and expected output?