Robert-Jan Streng (RobertJanStreng)
Atos Consulting
Partner Business Process Management
Atos Consulting
RobertJanStreng Member since 2014 15 posts
Atos Consulting
Posted: June 19, 2017
Last activity: June 26, 2017
Posted: 19 Jun 2017 9:05 EDT
Last activity: 26 Jun 2017 9:58 EDT

Understanding toLOCAL

Hello forum,

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

Pega Academy
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.