Posted: 19 Jun 2017 9:05 EDT Last activity: 26 Jun 2017 9:58 EDT
The Operator is in the Europe/Amsterdam timezone.
I set a property .BigDecimalproperty to @dateTimeToBigDecimal(@DateTime.CurrentDateTime(), "DateTime", tools) so now it contains the current dateTime (in GMT)
Then I set the propery .LocalBigDecimalproperty to @toLOCAL(.BigDecimalProperty,"Europe/Amsterdam") so now it contains the current dateTime in Amsterdam time.
And now I can set the property .LocalHour to @DateTime.hour(.LocalBigDecimalProperty)
At least, that is what I would expect. But if I do this locally at 14:15 (which is 12:15 GMT), then .LocalHour is set to 18, where I expected 14. Soemhoow it tries to drag me four hours to the east, whilst that is indicated nowhere.
What can be wrong? I am using the 7.1.9 version that is supplied with the LSA training (and yes, I have properly set the date and time of the VM).
PS also the examples that are provided with the toLOCAL function in the ruleset are not working as given. I must do something wrong here, but maybe it is so obvious that I don't see it
Did you check the timezone setup in requestor profile and also in your system settings. Pls check pxcreatedatetime of any workitem created in your PVS to understand the default timezone picked up by system.
As per Pega's recommendation toLOACL should work by if your intention is to get time in a specified timezone you can try out alternative DT functions.