* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* Author: Jani Nikula <jani@nikula.org>
*/
#include <sys/time.h>
#include <sys/types.h>
+#include "compat.h"
#include "parse-time-string.h"
/*
return set_user_tz (state, state->delim, v1, v2);
}
- if (!is_valid_time (v1, v2, v3))
+ if (!is_valid_time (v1, v2, n3 ? v3 : 0))
return -PARSE_TIME_ERR_INVALIDTIME;
- return set_abs_time (state, v1, v2, n3 ? v3 : 0);
+ return set_abs_time (state, v1, v2, n3 ? (int) v3 : UNSET);
}
/* strtoul helper that assigns length. */