pioyu2 chatbot is not telling me the correct time.here is the aiml script I am using.timer time.txt
i want pioyu2 chatbot to say the time in texas it is currently.
it's response to the question what time it is is the locale time is:9: AM. when it is actually 7 am.
The local is not the timezone, it just affects how the date is printed.
To set the timezone of the date use the "timezone" attribute set to the GMT hour offset.
<date format="%I: %p" timezone="+2" locale="en_US"/>You can also use Self to print a date, even from AIML,<template>The local time is: <self>Date.setTimeZone(Date.time(), "EST")</self></template>
Is there support for (GMT+9.30). Often there is only support for whole numbers. Adelaide, Australia is between +9 and +10. Since the bot I am making is only for myself, it defeats the purpose of time if It can only give me the time in Perth, or Melbourne, or Sydney, or Canberra.
This is still not working.
My bot was built using the basic template, but I deleted most of the self scripts as I was wanting NOTHING to over ride my aiml files. I was going to keep the DateAndTime script but since that was not giving the outputs I want, I deleted that too.
This is my AIML file, and I want every iota of it to work, without some other 'not by me' defined response given. I was testing this script yesterday without any changes, and with the DateAndTime self script in; even though it was giving me a non Australian country, and I was sure greetings were being given that was not in my aiml script. Do I have to delete EVERY self script to ensure only my aiml categories are used are used?
Currently these are the only self scripts I have running:
My AIML script. I have commented out most of it, for testing purposes, but I do want it to ALL work.
This was originally an aiml file. Why was it changed when I exported it?
I finally found where all these erroneous reponses were coming from: training and chatlogs.
After some more testing, I removed my commented out code from salutaitons.aiml and tried again, now that training and chatlogs were no longer interfering with my responses.
Problem now is, Adelaide is supposed to be GMT+9:30, but that was still giving me the wrong time, a whole hour fast. So I fixed the problem with +8:30. It works, but it is still wrong as it's not +9:30. Putting in GMT+9:30 didn't help.
<category><pattern>What time is it</pattern><template><random><li>The time is currently </li><li>It is currently </li><li>The time is </li><li>It is </li><li>Its </li></random><date timezone="+8:30" format="%I:%M%p"/> right now.</template></category>
I tried using Date.setTimeZone(Date.time(), "GMT+9:30") but it seems that can't used as a replacement for <date timezone="+8:30" format="%I:%M%p"/>, as it was assumed that I knew how to use it.
Any insight in why +9:30 was producing wrong time 5:1PM instead of 4:1PM?
The issue seems to be with the format="%I".For some reason we were adding 1 to the hour. We will update this.If you use Self, jformat or format="%X" it will have the correct hour.
<aiml><category><pattern>time</pattern><template><date timezone="+4" format="%I:%M%p"/> -- <date timezone="+4" format="%X"/> -- <self>Date.setTimeZone(Date.time(), "GMT+4")</self></template></category></aiml>