ropg / ezTime

ezTime — pronounced "Easy Time" — is a very easy to use Arduino time and date library that provides NTP network time lookups, extensive timezone support, formatted time and date strings, user events, millisecond precision and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't find Preference.h ESP32 PlatformIO

mars000 opened this issue · comments

hi
I am trying to compile on PlatformIO on ESP32
I have commented in #define EZTIME_CACHE_NVS as per instructions.
PlatfromIO still resulting in compile error....can't figure out why :-( I have confirmed Preferences.h is in esp32 library
Pls help.
A noob quesiton - where do I find codes for countries/cities ?

image

I haven't done much testing with PlatformIO, just with the Arduino IDE, so can't help much there.

As for timezone names: here is a list.

I have the same issue with ESP32 and PlatformIO - anybody been able to fix this "missing Preferences.h" error?

VSCode (the PlatformIO IDE) doesn't accept conditional code before precompiled headers (such as Preferences.h). You need to modify ezTime.cpp and include all the required files without #ifdef. That means that the modified ezTime.cpp file is no more generic but specific to your platform. Another solution is to modify the VSCode configuration not to use precompiled headers, but this will force complete recompilation each time you make a modification, I didn't try that.