Service Desk Practitioners Forum
cancel

WEB-API: Minus 1 Second from IServicecall getServicecallDate2

Highlighted
Kauer
Trusted Contributor.

WEB-API: Minus 1 Second from IServicecall getServicecallDate2

The method getServicecallDate2 from Class IServicecall returns a date value minus 1 second. For example when the Servicedesk field is 13:44:00, the method returns 13:43:59.
The method getServicecallDate2 returns a double that I converted to the date format using com.hp.ifc.util.ApiDateUtils.double2Date.

Does anyone know if this is a bug in Servicedesk WEB-API or did I use a wrong conversion method?

Thank you in advance.
2 REPLIES
Vasily Kamenev
Acclaimed Contributor.

Re: WEB-API: Minus 1 Second from IServicecall getServicecallDate2

HI
Look at DB, the DB time field stored with same minus offset :(. I'm doing next, when read value from DB add to existing value 500 ms( 1/2 of min.) and after convert to Date.

Vasily
Kauer
Trusted Contributor.

Re: WEB-API: Minus 1 Second from IServicecall getServicecallDate2

Hi Vasily
Thanks for your reply. The other strange thing is sometimes the method returns correctly and sometimes not. I have tried doing what you recommended, it works when the method returns minus 1 second, but when it returns correctly, I get a wrong information.
Thanks.