Question: Why is there a difference in the timestamp for an entity between the UI and the API? For example, when viewing the search history of an experiment in the UI, the timestamp appears in local time, whereas when the same search is performed using the API (POST/history/search), the timestamp is in UTC.
Explanation: Please find detailed information regarding the current functionality of our application in relation to time formats below:
Application Design and Time Formats:
Local Time in History/Audit Log:
Our application is designed to display timestamps in the history/audit log using the local time zone of the user. This ensures that the times are easily understandable and relevant to the user's context.
UTC Time in API Responses:
For consistency and adherence to international standards, the API returns timestamps in Coordinated Universal Time (UTC). We follow the ISO 8601 standard for formatting these timestamps, which ensures they are in a consistent and unambiguous format: YYYY-MM-DDThh:mm:ssZ
Format Details:
YYYY represents the year.
MM represents the month, always numeric.
DD represents the day of the month.
T separates the date and time components.
hh represents the hour in 24-hour format.
mm represents the minutes.
ss represents the seconds.
Z denotes that the time is in UTC.
This dual approach allows users to view times in their local context within the application, while maintaining a standardized format for data interchange and integration through the API.
Comments
0 comments
Article is closed for comments.