[p4] Question about headTime.

Kevin Regan k.regan at f5.com
Wed Apr 5 17:46:05 PDT 2006


Jeff,

I'm pretty sure you are correct.  I was getting confused by the behavior
of this script that I'm trying to debug.  It looks like it may need an
overhaul with regard to how it deals with dependencies.

--Kevin

-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Jeff Grills
Sent: Wednesday, April 05, 2006 3:01 PM
To: 'Ivey, William'; perforce-user at perforce.com
Subject: Re: [p4] Question about headTime.


I didn't think the issue was that the time which is stored is in the
local
timezone, but rather that it is the time UTC from that client's machine
(or
probably more precisely if my theory is correct, the UTC modification
time
of the file), and when you have multiple machines, the UTC time of those
machines may drift relative to one another.  If it was important to the
organization, a good IT department should have some process in place to
keep
the time on all the machines in sync - that technology has been
available
for many years (and there are many good free implementations too).

A quick glance at the perforce docs indicates that my theory is correct.
From
http://www.perforce.com/perforce/doc.052/manuals/p4guide/ab_filetypes.ht
ml#1
071566:

+m
Preserve original modification time
The file's timestamp on the local file system is preserved upon
submission
and restored upon sync. Useful for third-party DLLs in Windows
environments,
because the operating system relies on the file's timestamp. By default,
the
modification time is set to the time you synced the file. 

Looking at the perforce database schema, it clearly stores both the
changelist submission time and the file modification time.

A little further digging, though, revealed that the headTime as reported
by
fstat for two files in the same changelist with different filesystem
dates
were in fact the same.  So headTime appears to be the time that the
changelist was submitted, so I'd have to believe that that time is
coming
from the server, not from the client.  It just doesn't sound like
perforce
to do it the other way.  (Shrug)

j

-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Ivey, William
Sent: Wednesday, April 05, 2006 2:07 PM
To: perforce-user at perforce.com
Subject: Re: [p4] Question about headTime.

I just checked the output of p4 fstat and it certainly looks like
utc time to me. Most of the other commands do translate from utc to
local time.

When looking at the time stamp on a given client machine, you have
to know what the file type of the file in question says about time.
There is an option to use the submitted or synced time locally. I
think I'd stick with p4 fstat for accuracy.

-Wm
 

> -----Original Message-----
> From: perforce-user-bounces at perforce.com
> [mailto:perforce-user-bounces at perforce.com]On Behalf Of Kevin Regan
> 
> It seems that the Perforce depot keeps track of the time from 
> the client's machine and stores that in headTime.  This make 
> it somewhat difficult to create a script that attempts to do 
> dependency checking based on time.  The issue is that the 
> script end up comparing the time from one client machine to another.
> 

_______________________________________________
perforce-user mailing list  -  perforce-user at perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user

_______________________________________________
perforce-user mailing list  -  perforce-user at perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user




More information about the perforce-user mailing list