|
|
Member
Total posts: 18
Joined: Jan 28, 2016
|
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?
|
|
|
|
|
Posted: Feb 3, 2016 |
[ # 1 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
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>
|
|
|
|
|
Posted: Feb 4, 2016 |
[ # 2 ]
|
|
Member
Total posts: 18
Joined: Jan 28, 2016
|
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
|
|
|
|
|
Posted: Feb 4, 2016 |
[ # 3 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
Try replacing timez with timezone=“0”. For some reason, the forum doesn’t like to post the timezone parameter. Go figure!
|
|
|
|
|
Posted: Feb 4, 2016 |
[ # 4 ]
|
|
Member
Total posts: 18
Joined: Jan 28, 2016
|
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
|
|
|
|
|
Posted: Feb 4, 2016 |
[ # 5 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
The parameters in my category should produce something like 15:04. Could you post the response your bot is producing?
|
|
|
|
|
Posted: Feb 5, 2016 |
[ # 6 ]
|
|
Member
Total posts: 18
Joined: Jan 28, 2016
|
This is its reply:
yveete: The time is Friday, February 05, 2016
|
|
|
|
|
Posted: Feb 6, 2016 |
[ # 7 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
That seems odd. Could you post the category you are using please?
|
|
|
|
|
Posted: Feb 6, 2016 |
[ # 8 ]
|
|
Member
Total posts: 18
Joined: Jan 28, 2016
|
<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>
|
|
|
|
|
Posted: Feb 6, 2016 |
[ # 9 ]
|
|
Member
Total posts: 18
Joined: Jan 28, 2016
|
timez is supposed to be timezone=“0” .... but when i copy paste it changes to timez
|
|
|
|
|
Posted: Feb 6, 2016 |
[ # 10 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
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….?
|
|
|
|
|
Posted: Feb 6, 2016 |
[ # 11 ]
|
|
Member
Total posts: 18
Joined: Jan 28, 2016
|
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 !
|
|
|
|
|
Posted: Feb 6, 2016 |
[ # 12 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
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.
|
|
|
|
|
Posted: Feb 9, 2016 |
[ # 13 ]
|
|
Member
Total posts: 9
Joined: Feb 19, 2015
|
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?
|
|
|
|
|
Posted: Feb 10, 2016 |
[ # 14 ]
|
|
Member
Total posts: 18
Joined: Jan 28, 2016
|
This is what happens to me too!
|
|
|
|
|
Posted: May 2, 2016 |
[ # 15 ]
|
|
Member
Total posts: 4
Joined: Apr 6, 2016
|
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…
|
|
|
|