Modify

Opened 13 years ago

Closed 13 years ago

#9499 closed enhancement (worksforme)

A "server time" call would be very useful

Reported by: matt@… 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 osimons

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

comment:2 Changed 13 years ago by osimons

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

comment:3 Changed 13 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 13 years ago by osimons

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 anonymous

Resolution: worksforme
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain osimons.
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.