mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 19:26:37 +00:00
Fix compile error
Fix compile error
This commit is contained in:
parent
eb4f1173d3
commit
04bddf6370
@ -1897,7 +1897,7 @@ uint32_t standard_time = 0;
|
|||||||
uint32_t ntp_time = 0;
|
uint32_t ntp_time = 0;
|
||||||
uint32_t midnight = 1451602800;
|
uint32_t midnight = 1451602800;
|
||||||
uint32_t restart_time = 0;
|
uint32_t restart_time = 0;
|
||||||
int32_t time_zone = 0;
|
int32_t time_timezone = 0;
|
||||||
uint8_t midnight_now = 0;
|
uint8_t midnight_now = 0;
|
||||||
uint8_t ntp_sync_minute = 0;
|
uint8_t ntp_sync_minute = 0;
|
||||||
|
|
||||||
@ -1934,7 +1934,7 @@ String GetTimeZone()
|
|||||||
{
|
{
|
||||||
char tz[7];
|
char tz[7];
|
||||||
|
|
||||||
snprintf_P(tz, sizeof(tz), PSTR("%+03d:%02d"), time_zone / 60, abs(time_zone % 60));
|
snprintf_P(tz, sizeof(tz), PSTR("%+03d:%02d"), time_timezone / 60, abs(time_timezone % 60));
|
||||||
|
|
||||||
return String(tz); // -03:45
|
return String(tz); // -03:45
|
||||||
}
|
}
|
||||||
@ -2224,28 +2224,28 @@ void RtcSecond()
|
|||||||
if (local_time > 1451602800) { // 2016-01-01
|
if (local_time > 1451602800) { // 2016-01-01
|
||||||
int16_t timezone_minutes = Settings.timezone_minutes;
|
int16_t timezone_minutes = Settings.timezone_minutes;
|
||||||
if (Settings.timezone < 0) { timezone_minutes *= -1; }
|
if (Settings.timezone < 0) { timezone_minutes *= -1; }
|
||||||
time_zone = (Settings.timezone * SECS_PER_HOUR) + (timezone_minutes * SECS_PER_MIN);
|
time_timezone = (Settings.timezone * SECS_PER_HOUR) + (timezone_minutes * SECS_PER_MIN);
|
||||||
if (99 == Settings.timezone) {
|
if (99 == Settings.timezone) {
|
||||||
int32_t dstoffset = Settings.toffset[1] * SECS_PER_MIN;
|
int32_t dstoffset = Settings.toffset[1] * SECS_PER_MIN;
|
||||||
int32_t stdoffset = Settings.toffset[0] * SECS_PER_MIN;
|
int32_t stdoffset = Settings.toffset[0] * SECS_PER_MIN;
|
||||||
if (Settings.tflag[1].hemis) {
|
if (Settings.tflag[1].hemis) {
|
||||||
// Southern hemisphere
|
// Southern hemisphere
|
||||||
if ((utc_time >= (standard_time - dstoffset)) && (utc_time < (daylight_saving_time - stdoffset))) {
|
if ((utc_time >= (standard_time - dstoffset)) && (utc_time < (daylight_saving_time - stdoffset))) {
|
||||||
time_zone = stdoffset; // Standard Time
|
time_timezone = stdoffset; // Standard Time
|
||||||
} else {
|
} else {
|
||||||
time_zone = dstoffset; // Daylight Saving Time
|
time_timezone = dstoffset; // Daylight Saving Time
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Northern hemisphere
|
// Northern hemisphere
|
||||||
if ((utc_time >= (daylight_saving_time - stdoffset)) && (utc_time < (standard_time - dstoffset))) {
|
if ((utc_time >= (daylight_saving_time - stdoffset)) && (utc_time < (standard_time - dstoffset))) {
|
||||||
time_zone = dstoffset; // Daylight Saving Time
|
time_timezone = dstoffset; // Daylight Saving Time
|
||||||
} else {
|
} else {
|
||||||
time_zone = stdoffset; // Standard Time
|
time_timezone = stdoffset; // Standard Time
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local_time += time_zone;
|
local_time += time_timezone;
|
||||||
time_zone /= 60;
|
time_timezone /= 60;
|
||||||
if (!Settings.energy_kWhtotal_time) { Settings.energy_kWhtotal_time = local_time; }
|
if (!Settings.energy_kWhtotal_time) { Settings.energy_kWhtotal_time = local_time; }
|
||||||
}
|
}
|
||||||
BreakTime(local_time, RtcTime);
|
BreakTime(local_time, RtcTime);
|
||||||
|
@ -131,7 +131,7 @@ void DuskTillDawn(uint8_t *hour_up,uint8_t *minute_up, uint8_t *hour_down, uint8
|
|||||||
// double Zeitzone = 0; //Weltzeit
|
// double Zeitzone = 0; //Weltzeit
|
||||||
// double Zeitzone = 1; //Winterzeit
|
// double Zeitzone = 1; //Winterzeit
|
||||||
// double Zeitzone = 2.0; //Sommerzeit
|
// double Zeitzone = 2.0; //Sommerzeit
|
||||||
double Zeitzone = ((double)time_zone) / 60;
|
double Zeitzone = ((double)time_timezone) / 60;
|
||||||
double Zeitgleichung = BerechneZeitgleichung(&DK, T);
|
double Zeitgleichung = BerechneZeitgleichung(&DK, T);
|
||||||
double Minuten = Zeitgleichung * 60.0;
|
double Minuten = Zeitgleichung * 60.0;
|
||||||
double Zeitdifferenz = 12.0*acos((sin(h) - sin(B)*sin(DK)) / (cos(B)*cos(DK)))/pi;
|
double Zeitdifferenz = 12.0*acos((sin(h) - sin(B)*sin(DK)) / (cos(B)*cos(DK)))/pi;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user