Opened 5 years ago

Closed 5 years ago

#9499 closed enhancement (worksforme)

A "server time" call would be very useful

Reported by: matt@… Owned by: Odd Simon Simonsen
Priority: low Component: XmlRpcPlugin
Severity: minor Keywords:
Cc: Olemis Lang Trac Release: 0.12


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 5 years ago by Odd Simon Simonsen

Why don't you just make a ticket query with changetime criteria and just remember the last time you successfully queried?

comment:2 Changed 5 years ago by Odd Simon Simonsen

BTW, query for created and modified timestamps is Trac 0.12+.

comment:3 Changed 5 years ago by matt@…

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 5 years ago by Odd Simon Simonsen

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 5 years ago by anonymous

Resolution: worksforme
Status: newclosed

Yep, that works, sorry for the trouble :-)

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Odd Simon Simonsen.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.