Hi
In my application, we are also time logging the start time of process and end time in Db.
Start time is record when user starts creating an account and validates it and it records end time.
Everything was working fine till we realized in few random cases in DB : start time is recorded bigger than end time which is impossible and its not secods but hours difference.
SO that ld us to invesitigation how it is working:
When process starts:
Start time is stored in the session and passed to db using
java time :
When process is ongoing , record is created in DB with start time popualted and end time =null ofcourse.
Once it finishes, same record is updates, with end time =sysdate(oracle time)
1.Now i am pretty sure there could be better ways to log time (like Using System.currentTimeMillis())? Ofcouse i want to do it better.
But any of them could nt be reason of START TIME> END TIME
2.Also i have doubt if using Oracle time (sysdate ) as End time could be issue ?
3.If we debug, we are not able to replicate it ,its random & rare.
Should we try using better way to do time logging ? Please suggest.