cancel
Showing results for 
Search instead for 
Did you mean: 

Outlook Time interpreted minus 1 hour in BP

AndreKöpplin
Level 5
​Hello BP Community

I have one process in which we are reading information from Outlook (Date and Time) e.g. Wednesday, July 24, 2019 11:00 - 12:00 p.m. or Mittwoch, 24. Juli 11:00 - 12:00 Uhr and pasted it to an Outlook template.

After the migration to BP 6, the script interpreted all times minus 1 hour. Additionally, the script interpreted 12:00 p.m. often as 12:00 a.m.

To get the time from the Collection:

Trim(Mid([Data from confirmation.When], InStr([Data from confirmation.When], FormatDate(Now(), "yyyy"))+5, Len([Data from confirmation.When])))

Could someone help me to solve this problem?

Thanks and best regards
Andre


------------------------------
Andre Köpplin
Senior Business Process Analyst
Europe/Berlin
------------------------------
10 REPLIES 10

david.l.morris
Level 15
Your expression performed on 'Wednesday, July 24, 2019 11:00 - 12:00 p.m.' results in '11:00 - 12:00 p.m.'. That's not a time; it's just a string. When or how are you applying a time data type format to the string?

Edit: What I'm trying to understand is how Blue Prism could be interpreting the time wrong if it's not converting from text to time or datetime since the result I mentioned above cannot be directly casted into either of those data types.

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------

Dave Morris, 3Ci at Southern Company

AmiBarrett
Level 12
The key here is "After the migration to BP 6." Pretty much anything using DateTime functions got an overhaul, because they realized the logic was previously flawed.

Per their 6x release notes...
"When passing a Collection back from a Code Stage, if the DateTimeMode property had not been specified, the DateTime objects were being treated as being local time and subsequently being converted to UTC. By default, DateTimes that do not have a specified DateTimeMode property will now be set to UTC when passing a Collection to a Code Stage. This prevents unexpected time zone conversion."

------------------------------
Ami Barrett
Lead RPA Software Developer
Solai & Cameron
America/Chicago
------------------------------

@AmiBarrett Have you found that DateTimes from the in-built functions were affected (for example, FormatDateTime)? I actually never thought to check this. Last year I tested a bunch of the Collection Manipulation actions and found that even more of them affected DateTimes than the documentation indicated. But I never checked the functions. And I might be too lazy to re-install v5 to check but I'm really curious. =)​​

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------

Dave Morris, 3Ci at Southern Company

Can't say I've tested that yet! We're still running v5.4 over here. I've set up a couple of 6x environments before, but haven't actually coded in them yet.

------------------------------
Ami Barrett
Lead RPA Software Developer
Solai & Cameron
America/Chicago
------------------------------

​Hello Ami

Our BOT get Outlook invitations from Outlook and paste the start /end time to another E-Mail which is send manually. If we are running the BOT with Login Agent, the Time is minus 1 hour. If I running the BOT in the Foreground (Citrix) on my Computer, the time is correct.

We have more then 50 actions, which are touching the start /end time, so I am looking for a quite fast and stable solution. I am not the developer of the BOT, I take over the responsibility after the developing.

Best regards
Andre

------------------------------
Andre Köpplin
Senior Business Process Analyst
------------------------------

​Hello David

The BOT get the data from a Meeting invitation from Outlook and stored it in a collections. The data are used to write additional E-Mail. The format of the input is "Text". This collections data is used more then 50 times in the script to populate the E-Mail.

I am not the developer of the BOT, I take over the responsibility after the developing and the task to solve this problem 🙂

Best regards
Andre

------------------------------
Andre Köpplin
Senior Business Process Analyst
------------------------------

To clarify - when you say you're running the bot with Login Agent, you mean it's on another system right? If so, are both systems set to the same timezone?

------------------------------
Ami Barrett
Lead RPA Software Developer
Solai & Cameron
America/Chicago
------------------------------

​Hello Ami

Yes, the BP Server (Database) is in London and we are located in Poland/Switzerland. I already changed the times zone in Win10 and Outlook, but it isn't working. The meeting time is gather as Text-Format from the meeting confirmation.

Best regards
Andre


------------------------------
Andre Köpplin
Senior Business Process Analyst
------------------------------

I know I've previously seen some time discrepancies where the server and client were in different timezones, but that was mostly in regards to manually triggering schedules in the control room. It's possible there's still some of that going on in the background.

I know it isn't ideal, but would it be feasible to give the interpreted time a static offset?

------------------------------
Ami Barrett
Lead RPA Software Developer
Solai & Cameron
America/Chicago
------------------------------