mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-03 23:56:47 +02:00
Add support for custom timestamps in chat and logs.
Internal representations of the time_format setting are replaced by timestamp format strings. time_format is only used in the setup. Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
@ -299,7 +299,7 @@ static void update_friend_last_online(int32_t num, uint64_t timestamp)
|
||||
Friends.list[num].last_online.tm = *localtime((const time_t*)×tamp);
|
||||
|
||||
/* if the format changes make sure TIME_STR_SIZE is the correct size */
|
||||
const char *t = user_settings->time == TIME_12 ? "%I:%M %p" : "%H:%M";
|
||||
const char *t = user_settings->timestamp_format;
|
||||
strftime(Friends.list[num].last_online.hour_min_str, TIME_STR_SIZE, t,
|
||||
&Friends.list[num].last_online.tm);
|
||||
}
|
||||
|
Reference in New Issue
Block a user