Opened 13 years ago
Closed 13 years ago
#9499 closed enhancement (worksforme)
A "server time" call would be very useful
Reported by: | Owned by: | osimons | |
---|---|---|---|
Priority: | low | Component: | XmlRpcPlugin |
Severity: | minor | Keywords: | |
Cc: | Olemis Lang | Trac Release: | 0.12 |
Description
I have a Trac client that regularly searches for bugs that have been updated since the last time it searched for updated bugs. It would be really great if the XML-RPC interface offered a server.time() call (or something) that reported the local server time in UTC in order to calculate the clock drift between the client and the server.
Attachments (0)
Change History (5)
comment:1 Changed 13 years ago by
comment:3 Changed 13 years ago by
Maybe I'm doing something wrong: I use ticket.query with something like modified=2011-10-26T13:32:32.." as a search parameter in order to get all bugs modified since the time stamp, which the Trac instance interprets as being server time. But if there's clock drift between the client and the server (the time on the client is 13:32 and the time on the server is 13:30, for example), the client can't accurately find the bugs that have only been updated since it last queried.
comment:4 Changed 13 years ago by
If you go to a the project query web page and make the actual query, you'll see that it actually uses changetime=
as input.
Anyway, to not have to keep track of all the queries made, would it not just be best to remember the last modified ticket you got? Then you can just keep polling for changes since the last known change? Query for changetime=<timestamp>
+ order=changetime
and desc=1
to make sure you get the data in the right order?
Use the trac web query page as helper to construct the query you want.
Close ticket as worksforme
when you find that no changes in RPC plugin are actually needed... :-)
comment:5 Changed 13 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Yep, that works, sorry for the trouble :-)
Why don't you just make a ticket query with
changetime
criteria and just remember the last time you successfully queried?