[Owncloud] Timestamps from ownCloud WebDav
Rob Oakes
lyx-devel at oak-tree.us
Fri Nov 9 21:30:45 UTC 2012
Dear Developers,
I've been working on some real-time sync enhancements to Time-Drive and
had a question about timestamps being sent from the ownCloud WebDav
server. Up till now, I've been trying to get Time-Drive to correctly
identify modified files and propagate those changes to the server. That
now works well, which means that I've started working on a monitoring
local file changes and syncing those to the server.
While doing that, though, I noticed a strange problem. My timestamps
have started being of by about 7 hours (which is to say, the offset
between where I live and UTC).
Here's how I noticed it. Let's say that I modify a file and upload that
to the ownCloud server. Then, because I want the modified time to match
that on the local computer, I send a proppatch with the time in seconds
since the epoch.
Now, because the file is being actively worked on, it gets saved a
second time. The client requests information about the file on the
server in order to compare. In the server response, the timestamp is off
by seven hours. For new files, this means that the mdate is seven hours
into the future.
My question is, why is this happening? Am I doing something wrong? Has
the behavior of the lastmodified flag changed in ownCloud 4.5.x? Instead
of reporting the mdate as seconds since the epoch UTC, should I be using
local time instead?
I'd appreciate any thoughts.
Cheers,
Rob Oakes
More information about the Owncloud
mailing list