[p4] Question about headTime.
jgrills at junctionpoint.com
Wed Apr 5 15:00:50 PDT 2006
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.
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)
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
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.
> -----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
More information about the perforce-user