Link to home
Start Free TrialLog in
Avatar of naseeam
naseeamFlag for United States of America

asked on

Will Day of Week instead of Day of Month convert to unix format ?

The date is given in 16-bit modbus register as follows:

Bits  0  -  2            Day of Week (Sun = 0, Mon = 1,  ....   Sat  =  6)
Bits  3  -  6            Month of Year (1 -  12)      
Bits  7  -  9            Week of Month (1 - 4)

If I put this date in tm struct format and call mktime().  Will mktime() return
date in unix format ?  

Another words, if I construct tm struct with only Day of Week, Month of Year, and Week of Month, and call mktime(), will I get date in unix format  ?
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
'day of week' would be enough along with 'week of month' and 'month of year' if there was a year specified
If you know waht year to spcify however, everything is fine.

both these statements are wrong. the answer should not be the accepted answer.

Sara