azureazure-api-managementxml-to-jsonliquid-template

Can I change the timezone for my api from the server where it is stored? Azure API Manager


I am using Azure API Manager with an api whose policy converts xml-to-json (done with a liquid template). One of the tasks I have is that I need to make sure that the dates in my JSON object are in a certain timezone. I have come across the below:

%Z  Time zone name 

The closest server we have is Australia and I am trying to verify that each time it comes in NZST

Any ideas?


Solution

  • I have learnt you cannot, you can only change the formatting of the datetime.

    However during the conversion of xml-to-json the timezone is datetime is automatically formatted on what is used, for instance; GMT/UTC etc.

    The backend or frontend can only control the timezone, Liquid templating cannot.