mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
time: add support for time64 libcs
Treat time_t's as entirely unique and use the POSIX API's for converting to/from strings. Lastly, a 64-bit integer formats as 20 digits at most in base10. Don't need to have any 100 byte buffers to hold that. ASTERISK-29674 #close Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> Change-Id: Id7b25bdca8f92e34229f6454f6c3e500f2cd6f56
This commit is contained in:
committed by
Friendly Automation
parent
7a4a83ab27
commit
7f8803ba1c
@@ -245,8 +245,8 @@ static void icalendar_add_event(icalcomponent *comp, struct icaltime_span *span,
|
||||
if (!ast_strlen_zero(event->summary)) {
|
||||
ast_string_field_set(event, uid, event->summary);
|
||||
} else {
|
||||
char tmp[100];
|
||||
snprintf(tmp, sizeof(tmp), "%ld", event->start);
|
||||
char tmp[AST_TIME_T_LEN];
|
||||
ast_time_t_to_string(event->start, tmp, sizeof(tmp));
|
||||
ast_string_field_set(event, uid, tmp);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user