I’m using this:
let tz = this.homey.clock.getTimezone();
now = new Date().toLocaleString(this.homey.i18n.getLanguage(),
{
hour12: false,
timeZone: tz,
hour: “2-digit”,
minute: “2-digit”,
day: “2-digit”,
month: “2-digit”,
year: “numeric”
});
I use this.homey.i18n.getLanguage() as timezone, even if it’s only the first part of the zone (en or nb for you).
toLocaleString is returning the formated local string depoending on the zone/language sind FW 7.4. FW <7.4 is only returning the “en-US” version.
But the timezone was waorking in older FWs, too.