Skip to main content

Hello,



I am using Box API Python SDK to list files. The metadata of files is important for my work. The files in the source folder are uploaded by myself and I am in UTC+09:00 timezone.



But when I list the files using the API, all the timestamps returned by the API are in UTC-07:00.



Please let me know if that is the default case? or is there anything I can do.



SDK Version: 2.7.1


API: client.search.query(...)



Thank you 🙂

Hi!



Thanks for posting in our new developer community.



The API returns datetime infomation based on what the primary admin set as the enterprise time zone. That functionality is described here. If you are not seeing that happen, reply back - and I’ll get support to look into it.



Thanks,


Alex, Box Developer Advocate


Hi @smartoneinok,



Thank you for responding.


I just want to clarify the term Primary Admin. Does it mean, the one who owns and created those files in their Box account? or my account?


Because my account is set to use JST.



Thanks,


Chandan Purbia


The primary admin is the user who manages your Box enterprise account. It wouldn’t be the settings for any individual user, but instead the settings the primary admin has setting in the admin console enterprise set section.





Alex, Box Developer Advocate


Morning. I am working with @chandan.purbia.paidy. I am able to verify our Enterprise timezone setting is set to our correct timezone (JST / UTC+9). I have also opened a ticket with support - whom verified the settings and asked us to post here for additional help in resolving or clarifying this.



Thank you,


Mark


Interesting! I just tried this out in my own account and am seeing the same thing. Let me chase down some information internally and report back.


It looks like the documentation on timestamps may be outdated and/or incorrect. At this time, it does not look like there is a way to change the timestamp that the API is returning by default. Still investigating if something can be done.



In the meantime, you could convert the timestamp result returned from Box.


Hey @smartoneinok ,



Thank you for responding. Please let us know once the issue is fixed.


Reply