Am 22.08.2018 um 16:16 schrieb Ben Oliver:
> I'm having issues with clock settings on a DS1921 going from windows to
> owfs on linux, and vice-versa.
> 
> I (on owfs) set the time like this:
> 
>    echo "$(date +%s)" > "clock/udate"
> 
Which version of owfs do you use?

$ owfs --version



Owlib (owfs) uses gmtime_r() to turn the seconds till 1970-01-01 UTC
into a representation the DS1921 understands.

https://github.com/owfs/owfs/blob/master/module/owlib/src/c/ow_1921.c#L1065

This function assumes January == 0.

Unfortunately, the DS1921 datasheet does not state whether January is 0
or 1. Others have the same problem:

https://github.com/dustin/ibutton/blob/master/mlan/ds1921.c#L53


So far, I see only one way to find it out who's correct, check whether
the February, 29th correction the chip does works right with owlib or not.

Volunteers? Maybe Paul (or others) had checked that already in the past?

Kind regards

        Jan

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to