mirror of
https://github.com/esp8266/Arduino.git
synced 2025-11-28 17:36:39 +03:00
Allow to use temporary strings in configTime (#8606)
This commit is contained in:
@@ -269,10 +269,13 @@ long map(long, long, long, long, long);
|
||||
|
||||
void setTZ(const char* tz);
|
||||
|
||||
void configTime(int timezone, int daylightOffset_sec, const char* server1,
|
||||
// configure time using POSIX TZ string
|
||||
// server pointers *must remain valid* for the duration of the program
|
||||
void configTime(const char* tz, const char* server1,
|
||||
const char* server2 = nullptr, const char* server3 = nullptr);
|
||||
|
||||
void configTime(const char* tz, const char* server1,
|
||||
// configures with approximated TZ value. part of the old api, prefer configTime with TZ variable
|
||||
void configTime(int timezone, int daylightOffset_sec, const char* server1,
|
||||
const char* server2 = nullptr, const char* server3 = nullptr);
|
||||
|
||||
// esp32 api compatibility
|
||||
@@ -290,6 +293,12 @@ bool getLocalTime(struct tm * info, uint32_t ms = 5000);
|
||||
#include "WCharacter.h"
|
||||
#include "WString.h"
|
||||
|
||||
// configTime wrappers for temporary server{1,2,3} strings
|
||||
void configTime(int timezone, int daylightOffset_sec, String server1,
|
||||
String server2 = String(), String server3 = String());
|
||||
void configTime(const char* tz, String server1,
|
||||
String server2 = String(), String server3 = String());
|
||||
|
||||
#include "HardwareSerial.h"
|
||||
#include "Esp.h"
|
||||
#include "Updater.h"
|
||||
|
||||
Reference in New Issue
Block a user