Allow for timezone setting in user_config_override.h

This commit is contained in:
arovak 2021-03-17 12:23:00 +01:00
parent b1089039fd
commit eef386950f

View File

@ -3,8 +3,12 @@
#include <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"
#endif
#include <Arduino.h>
#include "ArduinoLog.h"
@ -20,6 +24,7 @@
void networkStart(void)
{
#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
#endif