Posted: 11 Aug 2016 9:25 EDT Last activity: 7 Nov 2016 13:16 EST
Empty Date fields default to 19700101
When the customer submits empty date field values, Pega is defaulting the value to 01/01/1970. The dynamic system setting (DSS) "disableEpochDateTime" was set to true but it still displays a blank date as 19700101.
Steps to Reproduce
1. Create a Service which expects a Date element and gives date as a response.
2. Send input date as blank and run the service.
3. In the response we could see 1970-01-01
Added dynamic system setting (DSS) "disableEpochDateTime" and was set to true but it still displays a blank date as 19700101.
I'm currently using Pega v7.2.
Thanks in Advance.
**Updated by Moderator: Lochan. Removed user added helpme, Ask the Expert and SR Created tag. Apologies for confusion, shouldn't have been an end-user option; added Category***
***Updated by Moderator: Marissa to add SR Details***
This is an expected behavior to set the Date to epoch date, that is 01-01-1970, when any java operations are performed on an empty Date/DateTime type property. But you can apply the following workaround to retain the empty date fields.
1) Add a java step in the file service activity and use following statement to get empty string out of date:
I was able to do a temporary work around on this issue but I have to make sure I do it where ever I use this Date field so, looking for a fix which helps me to fix this issue throughout the application.