We're updating the issue view to help you get more done. 

time_to_epoch tm_mon ternary operator does not allow January dates to be converted to an epoch timestamp

Description

There's a ternary operator used in the time_to_epoch function that sets tdays to 0 if the value in tm_mon of the time struct is 0. 0 happens to be used for January. Thus, if you try to convert a string of a date in January to an epoch timestamp, the resulting time_t value will be invalid. This tm_mon check should be removed and any parts of the codebase that rely on 0 implying "not set" instead of January should be fixed.

Environment

None

Status

Assignee

Former user

Reporter

Former user

Labels

None

Branch

master

Products

None

Time Tracking

1h

Components

Fix versions

Affects versions

1.0.0
0.10.0

Due date

2013/12/26

Priority

Major