Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configTime(tzsec,dstsec,): fix UTC/local management #6993

Merged
merged 11 commits into from
Feb 18, 2020
7 changes: 7 additions & 0 deletions cores/esp8266/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,13 @@ void configTime(int timezone, int daylightOffset_sec, const char* server1,
void configTime(const char* tz, const char* server1,
const char* server2 = nullptr, const char* server3 = nullptr);

// esp32 api compatibility
inline void configTzTime(const char* tz, const char* server1,
const char* server2 = nullptr, const char* server3 = nullptr)
{
configTime(tz, server1, server2, server3);
}

#endif // __cplusplus

#include "pins_arduino.h"
Expand Down
2 changes: 2 additions & 0 deletions cores/esp8266/coredecls.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ extern "C" {
#include <cont.h> // g_pcont declaration

extern bool timeshift64_is_set;
extern uint32_t sntp_real_timestamp;

bool can_yield();
void esp_yield();
void esp_schedule();
void tune_timeshift64 (uint64_t now_us);
void disable_extra4k_at_link_time (void) __attribute__((noinline));
bool sntp_set_timezone_in_seconds(uint32_t timezone);

uint32_t sqrt32 (uint32_t n);
uint32_t crc32 (const void* data, size_t length, uint32_t crc = 0xffffffff);
Expand Down
Loading