10 Replies Latest reply on Aug 10, 2015 11:53 AM by MichaelF_56 Branched to a new discussion.

    rtc_RtcTime2Sec() returns wrong seconds when RtcTime.year is 2016

    userc_10203

      I'm using BCM20737S.

      The followings are output of rtc_ctime() and rtc_RtcTime2Sec().

      If RtcTime.year is 2016, it seems that rtc_RtcTime2Sec() ignores RtcTime.month.

       

      Jan 1 12:00:00 2015 / seconds: 157809600
      Feb 1 12:00:00 2015 / seconds: 160488000
      Mar 1 12:00:00 2015 / seconds: 162907200
      Apr 1 12:00:00 2015 / seconds: 165585600
      May 1 12:00:00 2015 / seconds: 168177600
      Jun 1 12:00:00 2015 / seconds: 170856000
      Jul 1 12:00:00 2015 / seconds: 173448000
      Aug 1 12:00:00 2015 / seconds: 176126400
      Sep 1 12:00:00 2015 / seconds: 178804800
      Oct 1 12:00:00 2015 / seconds: 181396800
      Nov 1 12:00:00 2015 / seconds: 184075200
      Dec 1 12:00:00 2015 / seconds: 186667200

       

      Jan 1 12:00:00 2016 / seconds: 189345600
      Feb 1 12:00:00 2016 / seconds: 189345600
      Mar 1 12:00:00 2016 / seconds: 189345600
      Apr 1 12:00:00 2016 / seconds: 189345600
      May 1 12:00:00 2016 / seconds: 189345600
      Jun 1 12:00:00 2016 / seconds: 189345600
      Jul 1 12:00:00 2016 / seconds: 189345600
      Aug 1 12:00:00 2016 / seconds: 189345600
      Sep 1 12:00:00 2016 / seconds: 189345600
      Oct 1 12:00:00 2016 / seconds: 189345600
      Nov 1 12:00:00 2016 / seconds: 189345600
      Dec 1 12:00:00 2016 / seconds: 189345600

       

      Jan 15 12:00:00 2016 / seconds: 190555200
      Feb 15 12:00:00 2016 / seconds: 190555200
      Mar 15 12:00:00 2016 / seconds: 190555200
      Apr 15 12:00:00 2016 / seconds: 190555200
      May 15 12:00:00 2016 / seconds: 190555200
      Jun 15 12:00:00 2016 / seconds: 190555200
      Jul 15 12:00:00 2016 / seconds: 190555200
      Aug 15 12:00:00 2016 / seconds: 190555200
      Sep 15 12:00:00 2016 / seconds: 190555200
      Oct 15 12:00:00 2016 / seconds: 190555200
      Nov 15 12:00:00 2016 / seconds: 190555200
      Dec 15 12:00:00 2016 / seconds: 190555200

       

      Jan 28 12:00:00 2016 / seconds: 191678400
      Feb 28 12:00:00 2016 / seconds: 191678400
      Mar 28 12:00:00 2016 / seconds: 191678400
      Apr 28 12:00:00 2016 / seconds: 191678400
      May 28 12:00:00 2016 / seconds: 191678400
      Jun 28 12:00:00 2016 / seconds: 191678400
      Jul 28 12:00:00 2016 / seconds: 191678400
      Aug 28 12:00:00 2016 / seconds: 191678400
      Sep 28 12:00:00 2016 / seconds: 191678400
      Oct 28 12:00:00 2016 / seconds: 191678400
      Nov 28 12:00:00 2016 / seconds: 191678400
      Dec 28 12:00:00 2016 / seconds: 191678400

       

      Jan 1 12:00:00 2017 / seconds: 220968000
      Feb 1 12:00:00 2017 / seconds: 223646400
      Mar 1 12:00:00 2017 / seconds: 226065600
      Apr 1 12:00:00 2017 / seconds: 228744000
      May 1 12:00:00 2017 / seconds: 231336000
      Jun 1 12:00:00 2017 / seconds: 234014400
      Jul 1 12:00:00 2017 / seconds: 236606400
      Aug 1 12:00:00 2017 / seconds: 239284800
      Sep 1 12:00:00 2017 / seconds: 241963200
      Oct 1 12:00:00 2017 / seconds: 244555200
      Nov 1 12:00:00 2017 / seconds: 247233600
      Dec 1 12:00:00 2017 / seconds: 249825600

       

      Jan 1 12:00:00 2018 / seconds: 252504000
      Feb 1 12:00:00 2018 / seconds: 255182400
      Mar 1 12:00:00 2018 / seconds: 257601600
      Apr 1 12:00:00 2018 / seconds: 260280000
      May 1 12:00:00 2018 / seconds: 262872000
      Jun 1 12:00:00 2018 / seconds: 265550400
      Jul 1 12:00:00 2018 / seconds: 268142400
      Aug 1 12:00:00 2018 / seconds: 270820800
      Sep 1 12:00:00 2018 / seconds: 273499200
      Oct 1 12:00:00 2018 / seconds: 276091200
      Nov 1 12:00:00 2018 / seconds: 278769600
      Dec 1 12:00:00 2018 / seconds: 281361600