Please confirm that Losant hasn’t added a time zone API similar to Time Zone API 概览 | Google for Developers .
The related posts are older.
Hi Folks,
I was wondering if there are any helpers that can assist in converting timezones on the fly, similar to moment.js timezones?
Thanks
Paul
Hi
There seems to be a few areas where the conflict between local time (viewed) vs UTC (used) leaks and causes confusion for end users
Advanced queries on data tables are expressed UTC, however the data returned is displayed in Local time.
When we export data (data tables) and or provide it via web hooks all data is in UTC, we don’t seem to have a mechanism to express this data in local time for the intended recipient.
Unfortunately the bulk of my users would like the data in CSV for use in…
Our application requires control over date-time formatting. In particular we want to be able to report date / time with respect to lat-long device coordinates. The classical approach is to use a time zone database, but these need to be regularly maintained and don’t really fit with Losant workflows. Google offers a RESTful Time Zone API, which can be accessed from an HTTP node.
What I’d like is a Time Zone workflow block that can be fed a UTC time and lat-long or TZ database names like “Paci…
Thank you,
Andrew
If an experience similar to the Google Time Zone API is what you need - where, given a coordinate and a Unix timestamp, it returns the offset and timezone name - then I would recommend creating a custom node to interact with that service (using an HTTP Node that authenticates using a service credential ). Losant has no plans to build a similar service.
That said, the {{formatDate}}
helper takes optional timezone and locale arguments (as do the {{currentDateTime}}
and {{format}}
helpers).
We also have the Date/Time Node , which allows for operating on dates optionally within the context of a given timezone.