AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

How do i set the time or date ?
 
 

This is what i wrote in the pandorabot (playground) editor and it doesnt work :

<category>
    <
pattern>WHAT TIME IS IT</pattern>
    <
template>The time is <system>date</system></template>
</
category

 

Help?

 

 
  [ # 1 ]

Try this instead:

<category>
    <
pattern>WHAT TIME IS IT</pattern>
    <
template>The time is <date locale="en_GB" timez format="%I:%M %p" jformat="h:mm a"/></template>
</
category
 

 
  [ # 2 ]

It doesnt work. This is the displayed error message (in pandorabots):

Message:[in Sax parser] parse of # failed filename cache/manage/files/b4/b4961ccb20469363b1c52914b0ffb62acc7de155, position near character 164

 

 
  [ # 3 ]

Try replacing timez with timezone=“0”. For some reason, the forum doesn’t like to post the timezone parameter. Go figure!

 

 
  [ # 4 ]

oh, it work now. Is there a way to show the time (ex. 15:04) because what my bot replies is with the date rather than the time


Thanks a lot anyways

 

 
  [ # 5 ]

The parameters in my category should produce something like 15:04. Could you post the response your bot is producing?

 

 
  [ # 6 ]

This is its reply:

yveete: The time is Friday, February 05, 2016

 

 
  [ # 7 ]

That seems odd. Could you post the category you are using please?

 

 
  [ # 8 ]

  <category>
  WHAT TIME IS IT</pattern>
  <template>The time is <date locale=“en_GB” timez format=”%I:%M %p” jformat=“h:mm a”></template>
</category>

 

 
  [ # 9 ]

timez is supposed to be timezone=“0”  .... but when i copy paste it changes to timez

 

 
  [ # 10 ]

Try missing out the jformat part:

The time is <date locale=“en_GB” timez format=”%I:%M %p”>

timez should say timezone=“0”. Why does this forum insist on replacing that….?

 

 
  [ # 11 ]

Yes it works now, but what if i dont live in the UK , (i live in Romania). How do i change it so the time is 2 hours in front ?

Thanks !

 

 
  [ # 12 ]

I would either change it to timezone=“2” or find your date_locale from this link:
http://www.alicebot.org/aiml/aaa/Date.txt
It’s probably ro_RO from a quick look.

 

 
  [ # 13 ]

Was looking to find a solution to a related issue and stumbled onto this thread. I somehow cannot set the timezone. Tried timezone = “5” / “+5” / “05” etc and the bot reply gracefully degraded to retrieving the current date. Tried to set the locale as locale = “en_IN” and still doesnt work. Any idea why? Do I need to add any parameters to the format or the jformat attribute?

 

 
  [ # 14 ]

This is what happens to me too!

 

 
  [ # 15 ]

Yeah, it seems broken. As soon as one adds the “timezone” to the date element, it echos the default format as if there werde no parameters set. Very frustrating…

 

 1 2 > 
1 of 2
 
  login or register to react