Please help converting timezones
# 🤝help
i
When I get date responses from my google calendar api, botpress changes this to utc for some reason. The values are stored in an array of objects called busyDates. I'd like to convert these times to CAT/SAST. Can anyone help?
s
use AI task
input for AI task is your resultant array
prompt should be something like "convert the array into presentable format and one entry per line" (this is upto you)
Give task examples to the AI task card with one of your results by converting it manually
i've been using this method myself..but im sure u can aslo do a few things with execulte code too like Join()
i
Ashwin, you are a God send, thank you so much man
l
This is actually not Botpress, but how javascript manages timezone You can also do const newDate = new Date(youarray.getTime() +/- theTimeDiffernceinMinutes * 60000)
35 Views