Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Issue in conversion from decimal to date using toLOCAL or toGMT

SA-6131

Summary



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.
 

Error Messages



Not Applicable


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.

Root Cause



There was an issue in the logic when converting a decimal value to date value using the "toLocal" and "toGMT" functions.

Resolution



This issue is resolved by hotfix item
HFix-20459.

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us