Hi Community Team,
How to convert UTC date format in IST Local time with offset to UTC in API gateway service.
For example source date value is 2017-09-06 19:30:09 now I have to convert into IST local time with UTC offf set i.e. to 2017-09-06 02:00:09+05:30. Here I need to consider day light saving when converting.
Thanks in advance.
From where are you getting this date? The reason I ask is that there are a few gateway variables that you can use to get the current date and time. See below
We will get this date value from source request XML and then I have to convert into IST local time with UTC offf set i.e. to 2017-09-06 02:00:09+05:30 .
It sounds like you want to get a value from the message and apply rules/conversion to it?
Have you reviewed the set context variable? Which then can be referenced wherever you want?
It seems if you pull the date out of the request this would be the way to go to convert and apply an offset.
I have gone through the documentation and tried to implement and during the implementation observed that set context variable displayed as unrecognized format when I gave value as '2017-09-06 14:30:09'.
I have to assume,
Isnt fitting any of the internal formats I would have to do testing. But I would think it its not recognized you need to update.
datetime.customformats (and possibly) auto formats cluster property.
If it helps. I will try to do a quick test with your format but it will likely be next week before that occurs.
As suggested by you , I have managed to allow input date format by changing the cluster wide property.
Now am working on other part to convert it to 2017-MM-DDT09:12:00+01:00.