Issue in conversion from decimal to date using toLOCAL or toGMT
When an equivalent double value of a DateTime is being converted back to DateTime using the Pega out of the box (OOTB) functions toLOCAL or toGMT for some values it is returning a value which is bit off from the original one. e.g. the decimal equivalent of 12/7/2014 20:20 is 16263.847222222219. When converted to DateTime using @(Pega-RULES:DateTime).toGMT(16263.847222222219, "America/New_York") then the function returns: 20140713T001959.880 GMT i.e. the time is 0:19:59 which is one second less than the actual value. But if the function @(Pega-RULES:DateTime).minute(16263.847222222219) is being used then it gives the correct minute value i.e. 20.
Steps to Reproduce
Use the function @(Pega-RULES:DateTime).toGMT(16263.847222222219, "America/New_York") in an activity's Proprty-Set step to set the value of a DateTime property.
There was an issue in the logic when converting a decimal value to date value using the "toLocal" and "toGMT" functions.
This issue is resolved by hotfix item HFix-20459.
0% found this useful