Question
Maantic Inc
US
Last activity: 1 Jun 2019 3:13 EDT
Incorrect date added in database
Hi, When I try to save date in database using obj save, always date saved in DB one day minus.
Example : when I try to save date 7/18/2018, in database it stores values 7/17/2018.
property type is date
pega version 721
#helpme
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Merkle
GB
Hi John,
Have you check the date configuration in Database and Pega server, also validate the timezone defined in your user operator?
Also, could you please try to retrieve and display that value in the screen?
Please check and let us know if you still didn't found the issue. Hope we will be able to help you to resolve your issue.
Regards,
Gopesh
Maantic Inc
US
Thank you Gopesh for the response.
In operator, timezone is configured with America/NewYork
This date, we are using in backend comparison, no where it is displayed in screen level. after fetching the data from database is shows with one day off, that is how it is stored too.
Let us know what type configuration do you want to check in pega database server?
Merkle
GB
You are welcome John!
You can run 'SELECT DBTIMEZONE FROM DUAL;' comment in DB and will be able to see the timezone in the db.
Regards,
Gopesh
Merkle
GB
DB result of GMT zone.
Maantic Inc
US
it shows -07:00
Merkle
GB
Also, validate the clipboard post date set, I believe the date in clipboard also having the day difference. I had face similar issue few years back in one of US client, and had to write a Pega control to show correct date. Seems that's similar issue.
Maantic Inc
US
before storing into DB, Verified the clipboard it has right value. when I store it makes one day off
Pegasystems Inc.
IN
Hi John,
Can you please check what is the timezone of the database server?Also,If database server and application server are in the same timezone if it is an exposed column
Also,please re-confirm if you are using date or datetime property.
Maantic Inc
US
timezone -07:00, using date property
-
Sascha Wittrock Michael Zwilcher
PEG
GB
That sounds like a bug to my thinking.
I can understand why datetime properties may need to change on some offset of the user's current location.
But if it's purely a Date (no time) then I don't think this should be changing the value based on the current user's timezone.
If I enter my DOB into a system, I'd expect this to display the same date regardless of whether it's being viewed in Syndey or Los Angeles.
Is this definitely just a Date?
Maantic Inc
US
yes, it is date only. Property also date only.
Wipro
IN
HI @JohnPaulRaja, any solution you concluded to this issue. I am facing similar issue.
Merkle
ES
Hi All,
I faced the same issue.
It seems to be a bug in pega where if you specify datetime control on date, it wants to covert it still.
on the report, i changed the control to 'inherit from property' and it started to work as expected, no time was lost.
Hope it helps.
Pegasystems Inc.
IN
Hi ,
If this is a bug in pega then did you report it or did you raise any SR for this.If yes please share the ID.
Thanks,
Abhinav