Running bot from control tower gives other results!

Hello everyone!

I have a bot that in some point needs to verify the current date so it can calculate if it needs files from the day before or - for example - if today is monday the files from friday.
Running the bot from workfusion never gave me problems when finding the date, but now I published in Control Tower and the dates are all wrong.
For example, yesterday I tried to print the variable with the date “yesterday” in Studio and it printed correctly 25/02/20, but in control tower it printed 24/02/20, and it was the same code.
I already verify many times and there´s no problem with the script in WF, but if I run it from CT don´t works properly.

Here is that part of the code

The custom scripts I use are like this one:

input = ['fecha_hoy'],
output = 'fecha_anteayer'
def customeScript() {
fecha_anteayer = fecha_hoy.minus(java.time.Duration.ofDays(4))

I appreciate any help!

1 Like

Did you check the server time of your Control Tower.
You can set it to the correct time zone by navigating to:
System Settings -> System Preferences -> Preferences

and update the correct time zone.

1 Like

@alokroy Thanks for your answer!
I just checked that and it seems OK… I have another bot work with dates, didn’t have this problem