Collection Sort by DateTime different Time!

diarselimi

New Member
When I sort a collection with a DateTime column type the result of the DateTime will be different in the sorted collection.
Each row will be 2 hours less, I think there is a problem with the timezone.
 

VJR

Well-Known Member
Hi diarselimi,

Although I understand what you are trying to say would you be able to show the before and after of what is happening?
 

VJR

Well-Known Member
Hi diarselimi,

Problem:
That is right, it is due to the timezone. Blue Prism works with UTC time (in order to handle all timezones of the world).
It looks like your machine's timezone is UTC + 2 hence everytime when the collection is sorted the time is converted from your local time zone to 2 hours behind (which is the UTC time).
The timezone cause issues while typically working with Work Queues but it is strange to know that it even causes the same problems while sorting a collection.

Solution(s):
i. Change the time zone of your machine to the UTC. This may not be always possible and this change has to be done on all machines running the process. So this is not a recommended option.

ii. The 'Utility - Date and Time Manipulation' VBO has an action to convert the Local time to UTC and UTC to Local.
Use these functions over the collections or maybe just 1 function on the output collection - UTC to Local.

iii. The above VBO actions is only available in the latest versions.
If you do not have those actions then you can use a Calc stage to add 2 hours to the values of the collection.
 
Top