Giter Site home page Giter Site logo

dst_rtc's Introduction

DST_RTC

library for automatically adjusting RTC time for daylight saving time (DST)

requires RTClib

Function to figure out if we're in Daylight Saving Time, then adding an hour if we are in DST.
adapted from nseidle https://github.com/nseidle/Daylight_Savings_Time_Example/blob/master/Daylight_Savings_Time_Example.ino
and further adapted from Andy Doro https://github.com/andydoro/DST_RTC

This algorithm is programmed to observe Daylight Saving Time in the United States, where as of the time of writing DST is observed between the second Sunday in March and the first Sunday in November.

The rules for DST vary by country and territory.
https://en.wikipedia.org/wiki/Daylight_saving_time_by_country

The new version requires explicit definition of whether to use US or EU rules.

This method checks whether its 2am or not when the time change officially occurs (this addition by Peter Bradley).

Addition Peter Bradley

  • Added 2:00 AM time change for the USA.
  • In the European Union, Summer Time begins and ends at 1:00 a.m. Universal Time (Greenwich Mean Time).
  • For most of Europe DST usually begins on the last Sunday of March at 2:00 AM local time and ends on the last Sunday of October at 2:00 AM local time. The last Sunday of the month of March and October must always be on or after the 25th.

Installation

From the Library Manager

  1. Launch the Arduino IDE and navigate to Sketch → Include Library → Manage Libraries.
  2. In the library manager, scroll to DST_RTC or enter the name into the search field.
  3. Click on the library, then click on the Install button.

From the ZIP file

  1. Download the ZIP file.
  2. Launch the Arduino IDE and navigate to Sketch → Include Library → Add .ZIP Library.... From the prompt, select the ZIP just downloaded.

dst_rtc's People

Contributors

andydoro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dst_rtc's Issues

compiler throw related to rulesDST

Thanks for the handy library and the Word Matrix Clock project. Looks like I uncovered a bug in v1.1.X of your code; it throws when Arduino IDE v1.8.13 builds. I have not spent enough time with it to provide a resolution. The compiler fails due to an "undefined reference to rulesDST". Clearly it is declared in the header on line 5. So, not sure right now what the problem might be.

extern const char rulesDST[];

This occurs when building on Windows and Mac. On both, if I roll back the library to v1.0.0, the code (Word Clock code) builds.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.