mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-24 19:56:44 +00:00
Allow for timezone setting in user_config_override.h
This commit is contained in:
parent
b1089039fd
commit
eef386950f
@ -3,8 +3,12 @@
|
|||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#ifdef USE_CONFIG_OVERRIDE
|
||||||
|
#include "user_config_override.h"
|
||||||
|
#endif
|
||||||
|
#ifndef MYTZ
|
||||||
#define MYTZ "EST5EDT,M3.2.0/2,M11.1.0"
|
#define MYTZ "EST5EDT,M3.2.0/2,M11.1.0"
|
||||||
|
#endif
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "ArduinoLog.h"
|
#include "ArduinoLog.h"
|
||||||
|
|
||||||
@ -20,6 +24,7 @@
|
|||||||
void networkStart(void)
|
void networkStart(void)
|
||||||
{
|
{
|
||||||
#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266)
|
#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266)
|
||||||
|
LOG_WARNING(TAG_MAIN, F("TIMEZONE: %s"), MYTZ);
|
||||||
configTzTime(MYTZ, "pool.ntp.org", "time.nist.gov", NULL); // literal string
|
configTzTime(MYTZ, "pool.ntp.org", "time.nist.gov", NULL); // literal string
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user