Jump to content

Query Ftrack Server time


lukas g

Recommended Posts

Hello there :)

i am looking for a good way to Query Ftrack Server time. Right now i am doing it in a hacky way by committing an entity and query its creation date with:

"Event where parent_id is {} order by created_at desc".format(entity.id)

But i am looking for some query for just the current time without creating something first, as it introduces a slight time delay and isn't a nice practice.

Thank you in advance,

Lukas

Link to comment
Share on other sites

Thank you for your quick reply.

I excpected the ftrack server in UTC but I am afraid that i am seeing a 34sec time difference between utc and the creation dates of my ftrack entity. (They seem to be created in the future based on the "created_at" attribute from a Event query I am doing to check it.) Maybe I am doing something wrong but it worked out for the last months,  only since yesterday I had the time difference issue.

1. I am creating and committing some new entity.
2. I am doing a query to get the event where the "parent_id" is the same as the id of the entity i just created. (Query string: "Event where parent_id is my_entity.id order by created_at dec")
3. I take the returned object and read the "created_at" attribute and compare it with the utc -> the "created_at" gives a datetime 34sec in the future.

I can imagine that I am misunderstanding the way my query works and does not give me what i am expecting to get. Or that for some reason the Event Hub / Server introduces a wired time offset
(maybe also caused by some faults on  my side?)

Thank you's for you help :)

Lukas

 

EDIT: I just checked it for two different ftrack projects. The one project has no time difference the other seems to have these wired 34sec offset to the future.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...