It's all about the answers!

Ask a question

Mismatch in lastModified time ?


John Kelly (1231715) | asked Nov 29 '09, 9:39 a.m.
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

One answer



permanent link
Andrew Hoo (1.0k1) | answered Nov 30 '09, 11:08 a.m.
JAZZ DEVELOPER
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

Your answer


Register or 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.