AI Zone Admin Forum Add your forum

CX Company, chatbot market leader in the Netherlands since 2005, will speak on the Amsterdam Chatbots Meetup on Wednesday, Oct 18!

Refresh of %fulltime and time functions
 
 

Hi, I do a few calculations based on the time variables in chatscript.

When does %fulltime, % date etc. get refreshed?
Are they refreshed before every assignemt, macro usage or refreshed when used?
Is it theoretically possible that they can change from one line to another?

To make it more clear, can it happen if I am very unlucky during midnight, even if unlikely?

$$_timeNow = %fulltime
$$_dayToday = % date

_0 
= ^timeinfofromseconds ( $$_timeNow)
$
$_dayToday2 _3

if($$_dayToday2 != $$_dayToday)
{
  
# can this happen?


PS: I had to add a space between “%” and “date”, otherwise it got printed wrong

 

 
  [ # 1 ]

they are dynamically calculated at the point of reference. Yes they could change if you are unlucky. To protect against that you want to call %timenumbers to get everything at once

 

 
  login or register to react