Hi there - I am an artist and I need to log my time. Currently our time logs are set to days instead of hours - which doesn’t really work very well because usually we have to break down out log into a weird decimal if the time is less than an 8 hour day. I know for a fact it is possible to record time in hours instead, but i cant see anywhere how to change this. please let me know so we can make everyone’s lives so much easier.
thank you !!!
Hey @Brad_Betts—welcome to the forum!
I moved your post to the #shotgun category so that it gets the right on it.
awesome! thanks!
Hi,
You should ask your admin to have a look into your site preferences, especially the ‘scheduling’ part
thanks for the response! so -If this were to be changed on a project that is already running - could that cause any chaos or problens across the project? woudl there be a way to mitigate that ?
Hi Brad! There are two things you can do without needing to change that site pref:
- In the web UI, you can enter any value like “4 hours” and it will automatically interpret it into whatever the site pref is tracking. So in the below example when I entered this time log it converted to 0.5 days.
- In Shotgun Create, you also get a time log UI which accepts hours by default, no matter your site pref. If need be, you could also enter something like “2d” and it will still work.
DENNIS!!! THIS IS AMAZING!!! THANKYOU !!!
WOOOOOO!!!
This is wonder. However due to some API and tools we have, we need to query WHAT are the sites preferences for the time log durations.
Hopefully this is a simply query.
Currently there has been a request to change the site preferences from hours to days.
To be able to calculate this information, or make this change, knowing whether it is days or hours, and what a day is defined as is important.
Just haven’t attempted to query site preference information previously.
With Python API, how would you do this?
EUREKA! - So as I was typing this, gave me some ideas to do some hunting, and found it.
- One you open your session
SG = shotgun_api3.Shotgun(blah, blah blah) - Then use the sessions preferences_read() function
prefs = SG.preferences_read() - Now you have
prefs[‘duration_units’] (‘hours’, ‘days’)
prefs[‘hours_per_day’]
Hopefully this helps someone that had the same inquiry.