Dear Lim,
Please specify in what problem you have.
Currently it's difficult to understand and help.
Regards.
Dear Lim,
Please specify in what problem you have.
Currently it's difficult to understand and help.
Regards.
As i have stated earlier...
I added the code given above, but aint able to send out messages.
When i remove the code, i am able to send out messages, but the time and date does not.
As i told above i can send message.
Thus please add code you need and describe steps to reproduce the problem with message sending processing.
Regards.
Hi, i have added to code. And thus, date is working but sending messages failed.
Hi Lim,
Please use following js code for "Date" field in "create message" request mapping:
pre
return new Date().toISOString().replace(/T.*/gi, "");
/pre
Regards.
Hi thanks it works fine now!
Can i know how to change the time zone? As currently the time is according to your timezone.
Hello Lim,
Please look at this link: https://developer.mozilla.org/en-US/d...
Hi,
Am i suppose to add this code :
var x = new Date();
var currentTimeZoneOffsetInHours = x.getTimezoneOffset() / 60;
under my response tab at the date in the javascript?
The link is not very clear.
Hi Lim,
Unfortunatly you can not change timeZone on Appery.io server.
But you can change time which is you show your users.
In this case you need to use following code:
pre
//Current time - please change this with date you need.
var pubDate = new Date();
//This is your goal time zone.
var offset = +5;
//Convert date to UTC
var utc = pubDate.getTime() + (pubDate.getTimezoneOffset() * 60000);
// create new Date object for different city
// using supplied offset
newDate = new Date(utc + (3600000*offset));
/pre
Regards.
Hi thanks but where do i place this code at?