Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unix time not working #3

Open
Alnoor55 opened this issue Nov 28, 2016 · 2 comments
Open

unix time not working #3

Alnoor55 opened this issue Nov 28, 2016 · 2 comments

Comments

@Alnoor55
Copy link

DS1302RTC.cpp need to be corrected as follows
// PUBLIC FUNCTIONS

// --------------------------------------------------------
// Read the current time from the RTC and return it as a
// time_t value. Returns a zero value if an bus error occurred
// (e.g. RTC not present).
time_t DS1302RTC::get()
{
tmElements_t tm;
if (read(tm) == false) return 0;

return(makeTime(tm));

}

@sergiuszm
Copy link

@Alnoor55 Everything is fine with the library. When you change that line in that way - then your code is broken, because read(tm) returns 0 on success and 1 on failure.

@Alnoor55
Copy link
Author

Alnoor55 commented Feb 22, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants