Ensure that the new line is not counted as part of the date string.
const f_status_t status = f_string_append(string, strnlen(string, F_time_calendar_string_length_d), destination);
if (F_status_is_error(status)) return status;
+ // Ensure that if a new line is added by asctime_r(), it is removed.
+ if (destination->used && destination->string[destination->used - 1] == f_string_ascii_feed_line_s.string[0]) {
+ --destination->used;
+ }
+
return F_okay;
}
#endif // _di_f_time_calendar_string_part_