#include <WiFi.h>
#include <time.h>
struct tm timeinfo;
unsigned long Epoch_Time;
void setup() {
Serial.begin(115200);
delay(1000);
Serial.print("Connecting to ");
WiFi.begin("Wokwi-GUEST", "", 6);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting...");
}
Serial.println("Connected to WiFi");
configTime(7 * 3600, 0, "pool.ntp.org"); // Set up time sync via NTP
}
void loop() {
time_t now; // Get current time
Epoch_Time = time(&now);
Serial.println(Epoch_Time); // Print current time in human-readable format
delay(1000); // Wait for one second
}