I am using a Uno as a data logger with a DS1307 RTC and the following libraries Time.h DS1307RTC.h
The DS1307 does not have any support for DST and neither library includes Time Zone.
Are there any libraries which adjust for DST?
I used the
Timezone module to correct my times for DST.
It took a little time to sort it out, so I though I would post the steps I followed.
WriteRules for my Timezone.
I copied rule from
NOTE also need to modify Timezone in setup(void)
WriteRules.pde to write rules to EEPROM address 100
TimeRTCSet.pde to set RTC time to UTC.
Start Serial Monitor.
In Terminal send time to Arduino
date -u +T%s > /dev/tty.usbmodemFA131
HardwareRTC.pde to demonstrate time display in UTC & local
I modified my sketch by including the following code:-
#include <Timezone.h> //https://github.com/JChristensen/Timezone ⋯ Timezone myTZ(100); //assumes rules stored at EEPROM address 100 TimeChangeRule *tcr; //pointer to the time change rule, use to get TZ abbrev time_t utc, local; ⋯ utc = now(); local = myTZ.toLocal(utc, &tcr);