Hi ,
We have exposed the Postgres DB through Apigee API proxy. And the postgres data has a column field timestamp, even though the field is with timezone(GMT+0x:00), response we are getting contains the timestamp filed in UTC time zone. like:
"date_time": "2017-01-01T11:00:00.000Z"
We want it to be sent in i.e GMT+0x:00
I can get the timestamp from nodejs app in console.log but not sure how to get the API response timestamp field in IST timezone.
Thanks,
Amit.
How about using Moment.js for this. For instance, you can use the snippet below to convert in UTC to IST:
var utc = 1502212611; var m = moment.unix(utc).tz('Asia/Kolkata').format('YYYY-MM-DD HH:mm:ss'); console.log(m);
Thats what I used to get d timestamp in console.log
But my requirement is about the data column, which is being exposed thru Api proxy.
My understanding is apigee should not alter d backend data being exposed.
But we are seeing d data coulmn of timestamp getting changed to UTC timezone while backend data column is in GST(gulf) timezone.
User | Count |
---|---|
7 | |
2 | |
2 | |
2 | |
1 |