ambitious-aqua
ambitious-aqua15mo ago

timezone

anyone knows how to set up the timezone to the voiceflow chatbot? Do you have any code or something?
11 Replies
Tico | Voiceflow Assistant
The original output seems to contain information that is not present or supported by the provided source documents. Specifically, the details about setting up the timezone for a Voiceflow chatbot, using JavaScript to handle the timezone data, and integrating it into the bot's responses are not mentioned in the source documents. Therefore, it's not possible to provide a revised output based on the current source documents. For accurate information on this topic, please refer to the official Voiceflow documentation or other relevant resources.
W. Williams (SFT)
what are you trying to do?
ambitious-aqua
ambitious-aquaOP14mo ago
like, if the client is asking to talk with the supp team, and it 12am. The bot say: Our team are not abiable right now. they are working form 9am to 8pm as a example
W. Williams (SFT)
you can do this pretty easily with javascript
const offsetInHours = 5

const adjustedDate = new Date()
adjustedDate.setHours(adjustedDate.getHours() + offsetInHours)

const hours = adjustedDate.getHours()

// Create this var in VF
officeHours = hours >= 9 && hours < 20 ? 'TRUE' : 'FALSE'
const offsetInHours = 5

const adjustedDate = new Date()
adjustedDate.setHours(adjustedDate.getHours() + offsetInHours)

const hours = adjustedDate.getHours()

// Create this var in VF
officeHours = hours >= 9 && hours < 20 ? 'TRUE' : 'FALSE'
@user.
ambitious-aqua
ambitious-aquaOP14mo ago
THANKS I SWEAR THAT I'VE TRY IT BEFORE with javascript code but he didn't get me the right one
W. Williams (SFT)
The offset is based on GMT/UTC time. So in the us east coast it would be -5 (I think).
ambitious-aqua
ambitious-aquaOP14mo ago
I'm from spain so it's 1 I think
W. Williams (SFT)
Where in spain?
W. Williams (SFT)
so 2
ambitious-aqua
ambitious-aquaOP14mo ago
thanks @W. Williams (SFT)

Did you find this page helpful?