BrowserStack API returns UTC timestamps but UI shows local time – unresolved timezone consistency
0 reputation · 07 May 2024, 15:10 UTC
Background
BrowserStack’s Automate API supplies start_time and end_time fields in UTC for all test sessions. In contrast, the web UI displays these timestamps converted to the viewer’s local time zone. When a test is scheduled, a timezone field can be supplied in the payload; the UI then attempts to adjust the session times accordingly. However, this parameter has no effect on on‑demand tests, leading to divergent time‑zone handling between test types.
Unresolved Decision
The documentation does not clarify whether the timezone field is intended to override UTC globally or remain limited to scheduled tests. There is also no documented option for a default global time‑zone setting that would affect all API responses and UI displays.
Key Questions
- Should the
timezoneparameter be honored for on‑demand tests, and if not, what is the rationale behind this restriction? - Will BrowserStack introduce a global time‑zone configuration that applies uniformly to API responses, UI displays, and log timestamps?
- How can developers reliably convert UTC timestamps to their desired local zone when the API does not provide a consistent time‑zone context across test types?