Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Mismatch in lastModified time ?

I have a piece of code which extracts, amongst other things, the "lastModifiedDate" for a file..


					IFileItemHandle hFile = (IFileItemHandle) item;


IFileItem file = (IFileItem) configuration
.fetchCompleteItem(hFile, monitor);

IContributorHandle hCont = file.getModifiedBy();
IContributor contrib = (IContributor) im.fetchCompleteItem(
hCont, IItemManager.DEFAULT, monitor);

String lastModifiedDate = file.modified().toString().substring(0,19);
String lastModifiedBy = contrib.getUserId();
String componentName = component.getName();


If I compare lastModifiedDate with the date/time I see in the history through the UI there is a mismatch of about times

The code returned 2009-11-26 16:04:53, but UI views of the files (show history), refer to the change in terms of the change set, the time is 26th November 16:29

I'd like to understand what the file.modified() refers to as I'd like to present a consistant set of data.

regards
John

0 votes



One answer

Permanent link
The file time is the time the file was checked into the repo.

The Show History time is labeled the time the change set was created.

On Sun, 29 Nov 2009 09:53:02 -0500, jkelly
<john> wrote:

I have a piece of code which extracts, amongst other things, the
"lastModifiedDate" for a file..


IFileItemHandle hFile =
(IFileItemHandle) item;

IFileItem file = (IFileItem) configuration
.fetchCompleteItem(hFile, monitor);

IContributorHandle hCont = file.getModifiedBy();
IContributor contrib = (IContributor)
im.fetchCompleteItem(
hCont, IItemManager.DEFAULT, monitor);

String lastModifiedDate =
file.modified().toString().substring(0,19);
String lastModifiedBy = contrib.getUserId();
String componentName = component.getName();


If I compare lastModifiedDate with the date/time I see in the history
through the UI there is a mismatch of about times

The code returned 2009-11-26 16:04:53, but UI views of the files (show
history), refer to the change in terms of the change set, the time is
26th November 16:29

I'd like to understand what the file.modified() refers to as I'd like
to present a consistant set of data.

regards
John

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,941

Question asked: Nov 29 '09, 9:39 a.m.

Question was seen: 5,097 times

Last updated: Nov 29 '09, 9:39 a.m.

Confirmation Cancel Confirm