Note: this was first posted on SAPfans ABAP forum.
I was in debugger, having set the time zone in my profile to one different with our server time zone. There is a function call in my program that is done in update task. The reason to debug was that document creation time was not the local time but rather server time.
Imagine that: you have a debugger window with the value of sy-timlo of, say 14:30. You enable update task debugging, step into the function, a new window is opened for update task debugging, you type sy-timlo there and oooppps! It shows 15:30!
But! OSS have all the answers for us ready! Just read the Note 534054 – “SY-TIMLO and SY-DATLO incorrect in update”.
The SY-TIMLO and SY-DATLO values in the update do not match the values in the dialog box or the debugging.
SY-TIMLO SY-DATLO update
Reason and Prerequisites
Up to Release 4.6D (incl.), when creating an update request, the system does not store any information in the update request about the time zone of the user who has generated the update request. Therefore, the SY-TIMLO and SY-DATLO fields contain the same values as SY-UZEIT and SY-DATE when updating.
Now! That’s really encouraging! We are on 4.6C and the only general solution for us is to upgrade. Until then we have to be careful about dates and times. As I wrote in February, we already had some surprises with time zones, but this one is especially good, and it doesn’t look like it’s our fault. Well… whaever happens, I can always say: “it could be worse”…