Query Ftrack Server time
2 2

3 posts in this topic

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
2 2