You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ezTime/examples/Timezones/Timezones.ino

30 lines
681 B

#include <ezTime.h>
#include <WiFi.h>
void setup() {
Serial.begin(115200);
while (!Serial) { ; } // wait for Serial port to connect. Needed for native USB port only
WiFi.begin("your-ssid", "your-password");
// Uncomment the line below to see what it does behind the scenes
// ezTime.debugLevel(INFO);
waitForSync();
Serial.println();
Serial.println("UTC: " + UTC.dateTime());
Timezone myTZ;
// Anything with a slash in it is interpreted as an official timezone name
// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
myTZ.setLocation("Pacific/Auckland");
Serial.println("Auckland: " + myTZ.dateTime());
}
void loop() {
events();
}