sleemanj / DS3231_Simple

An Arduino Library for EASY communication with DS3231 I2C RTC Clock and Atmel AT24C32 I2C EEPROM commonly found on the same board. Implements setting, getting the time/date, setting, checking and clearing alarms, and dead-easy circular-buffered logging of data with timestamp.
MIT License
82 stars 25 forks source link

Daylight saving Time #9

Closed bobybobybob closed 6 years ago

bobybobybob commented 6 years ago

Hello

very great Programm, i like it very much. I just miss one thing... that annoying summer- and wintertime.

what do you recommend for this problem? Can you make a sample program?

sleemanj commented 6 years ago

DST is timezone dependant. you need to adjust the time manually to suit your specific place in the world.

I recommend to always deal only in UTC (GMT, Time Zulu) then you don't need to worry about such things.

See Tom Scott's video for why it's not a simple problem https://www.youtube.com/watch?v=-5wpm-gesOY

bobybobybob commented 6 years ago

Hello and thank you very much for fast reaction and answer.

UTC time is not used in my living environment. It also confuses having two different time formats. (Local and UTC).

Christiansen has a library called Timezone. It is also possible to give the UTC time that libary and it then says if now summer time or not. It work, but is in your RTC library the possible to changing the current time by +/- X seconds during operation? RTC have UTC Time but output is Local Time with custom +/- Seconds or set the RTC with +/- X Seconds.

That would be easy to make a Word Clock too.

bobybobybob commented 6 years ago

may God bless you on all your ways. Haleluja i solve the problem

zstergios commented 6 years ago

how you solved the time changes ?

bobybobybob commented 6 years ago

RTC in UTC Time and local Time for use with Timezone Lib. Set the Timezonelib with the UTC Time. For Alarm i have to use UTC Time so i use a if for alarm in wintertime and one für summertime.

Another way is use Timezonelib and RTC in local time. The RTC Lib + Flag sets the RTC Time new.

Both are ugly and not nice, but work. I prever the first one