This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430 RTC Calendar struct

Hello,

I am using the RTC_A functionality that is part of driverlib.

I noticed that the Calendar struct has the following elements:

typedef struct Calendar
{
	//! Seconds of minute between 0-59
	uint8_t Seconds;
	//! Minutes of hour between 0-59
	uint8_t Minutes;
	//! Hour of day between 0-24
	uint8_t Hours;
	//! Day of week between 0-6
	uint8_t DayOfWeek;
	//! Day of month between 0-31
	uint8_t DayOfMonth;
	//! Month between 0-11
	uint8_t Month;
	//! Year between 0-4095
	uint16_t Year;
} Calendar;

Why does the DayOfMonth go from [0, 31] and Hours go from [0, 24]?  If you look at your typically struct tm in time.h, day of the month goes from [1,31] and hours go from [0, 23].

Any insight would be very helpful.

Brent

 

 

**Attention** This is a public forum