Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Presentation server file dates - Bug in

olivier_muff
Explorer
0 Kudos

Is there a way to get correct dates from a file listing on my presentation server (local computer).

When I use

CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES

all the dates: Creation, Last Modified, Last Accessed are all listed as the same for any particular file in the file list table. The dates are all equal to the last accessed date. This is not correct!

I tried testing the C_ functions but it seems they are just for getting file data of the application server. Is this true?

Olivier

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Please make sure that you are on the latest patch level for your release of SAPgui, this may be a bug which as been corrected. Also, after the SAPgui upgrade you may notice that the times will be in GMT time, not the local time of the PC, so if this is an issue for you, you will need to convert the time to your local time. If you don't have any requirement for time, then there is not issue.

Regards,

Rich Heilman

5 REPLIES 5

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Please make sure that you are on the latest patch level for your release of SAPgui, this may be a bug which as been corrected. Also, after the SAPgui upgrade you may notice that the times will be in GMT time, not the local time of the PC, so if this is an issue for you, you will need to convert the time to your local time. If you don't have any requirement for time, then there is not issue.

Regards,

Rich Heilman

0 Kudos

Thanks Rich. That did the trick. DIRECTORY_LIST_FILES gives proper dates and times now.

Now all I need to do is understand the logic of Microsoft's date changing. The "creation date" changes whenever a file is copied. The "date accessed" also changes any time a file is moved. The "date modified" seems like the only one that is relatively trustworthy.

all the best,

Olivier

0 Kudos

There still seems to be some bug in this method. The dates that are returned by my File object are as follows:

CREATEDATE D 8 20070814

CREATETIME T 6 140537

ACCESSDATE D 8 20070904

ACCESSTIME T 6 163113

WRITEDATE D 8 20070904

WRITETIME T 6 150631

The times in Windows seem to be two hours more then what SAP thinks.

Create Date same

Create Time 160537 - two hours off

Access Date same

Access TIME 183113 - two hours more then SAP thinks

Write DATE same

Write TIME 170631 - again 2 hours off.

Any ideas?

Thanks,

Olivier

olivier_muff
Explorer
0 Kudos

The times and dates are being returned properly by the method but they seem to be 2 hours off. Is it possible there is a bug in the Military Time to non-military time?

0 Kudos

It is because the times are returned in GMT time. This is actually an "enhanement" done by SAP with the latest patches of the SAPgui. This really caused some problems when we upgraded the gui, because our times where 5 hours off after the upgrade, which cause problems in downstream operations. I had opened a note about it, and they said this is not a bug, and it is the way it is, and that we(as developers) would need to convert to our specific time zone, which is easy for me, since my company only operates in one. .

Regards,

Rich Heilman