A permanent time difference of 3 or more hours. I tried different options. Setup is one of these options.
local.setPosix(F("Europe/Moscow"));
local.setLocation(F("Europe/Moscow"));
local.setTime(10800);
char *t_zone[4] = {"tz_name", "iso", "tz", "tz_rule"};
Blynk.sendInternal("utc", "time"); // Unix timestamp (with msecs)
Blynk.sendInternal("utc", t_zone[mass]);
I change these values. There is always a difference of 3 hours. How and where to choose a time zone?
BLYNK_WRITE(InternalPinUTC) {
String cmd = param[0].asStr();
if (cmd == "time") {
uint64_t utc_time = param[1].asLongLong();
UTC.setTime(utc_time / 1000, utc_time % 1000);
}
// else if (cmd == "iso") {
// String iso_time = param[1].asStr();
// }
else if (cmd == "tz") {
String tz_offset = param[1].asStr();
local.setPosix(F("Europe/Moscow"));
long dst_offset = param[2].asInt();
}
else if (cmd == "tz_name") {
String tz_name = param[1].asStr();
local.setPosix(F("Europe/Moscow"));
}
else if (cmd == "tz_rule") {
String tz_rule = param[1].asStr();
local.setPosix(F("Europe/Moscow"));
}