[vbox-dev] Inconsistent timestamps from IGuestFsObjInfo

Magnus Madsen madsen.magnus at gmail.com
Thu Apr 3 10:16:00 GMT 2014

I've noticed something odd while processing files in a guest file system.

I can retrieve with no problems an IFsObjInfo from
IGuestSession::fileQueryInfo and read most of the information with no
issues, but the timestamp fields:

* IFsObjInfo::accessTime
* IFsObjInfo::birthTime
* IFsObjInfo::modificationTime - being the one I am actually interested in.

I understand correctly that they should be returned as UNIX timestamps, yes?

The values for each of these values seem to be semi-random: if I read the
value for the same file, the values change each time I read them.

An example:
accessTime: 4611687856674308103
birthTime: 61683424
modificationTime: 1099702688

None of which makes sense as UNIX timestamps. Furthermore reading the
information from the same file again returns the following:

accessTime: 52218215858178
birthTime: 61685760
modificationTime: 1105479024

Another observation I have made is that IFsObjInfo::modificationTime is
always identical to IFsObjInfo::nodeId - reading the documentation, this
doesn't really make sense to me why this would be.

I tested this on VirtualBox 4.3.10 with a Windows 7 host and guest, but it
also occurs in older versions as far as I can tell. I thought perhaps
marshalling could be the issue, and that the values should be ulong rather
than long, but I still don't see how that would cause them to vary each
time the information is read.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20140403/b28f2412/attachment.html>

More information about the vbox-dev mailing list