mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 12:13:02 +01:00
commit
65aba6e77d
@ -91,7 +91,7 @@ void sort_friendlist_index(void)
|
|||||||
static void update_friend_last_online(int32_t num, uint64_t timestamp)
|
static void update_friend_last_online(int32_t num, uint64_t timestamp)
|
||||||
{
|
{
|
||||||
friends[num].last_online.last_on = timestamp;
|
friends[num].last_online.last_on = timestamp;
|
||||||
friends[num].last_online.tm = *localtime(×tamp);
|
friends[num].last_online.tm = *localtime((const time_t*)×tamp);
|
||||||
|
|
||||||
/* if the format changes make sure TIME_STR_SIZE is the correct size */
|
/* 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->time == TIME_12 ? "%I:%M %p" : "%H:%M";
|
||||||
@ -383,7 +383,7 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m)
|
|||||||
getmaxyx(self->window, y2, x2);
|
getmaxyx(self->window, y2, x2);
|
||||||
|
|
||||||
uint64_t cur_time = get_unix_time();
|
uint64_t cur_time = get_unix_time();
|
||||||
struct tm cur_loc_tm = *localtime(&cur_time);
|
struct tm cur_loc_tm = *localtime((const time_t*)&cur_time);
|
||||||
|
|
||||||
bool fix_statuses = x2 != self->x; /* true if window x axis has changed */
|
bool fix_statuses = x2 != self->x; /* true if window x axis has changed */
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ struct tm *get_time(void)
|
|||||||
{
|
{
|
||||||
struct tm *timeinfo;
|
struct tm *timeinfo;
|
||||||
uint64_t t = get_unix_time();
|
uint64_t t = get_unix_time();
|
||||||
timeinfo = localtime(&t);
|
timeinfo = localtime((const time_t*)&t);
|
||||||
return timeinfo;
|
return timeinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user