mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
tz should be cached in static variable
This commit is contained in:
parent
c94495bc31
commit
1ef361684f
@ -308,8 +308,6 @@ GSList *
|
|||||||
chat_log_get_previous(const gchar * const login, const gchar * const recipient,
|
chat_log_get_previous(const gchar * const login, const gchar * const recipient,
|
||||||
GSList *history)
|
GSList *history)
|
||||||
{
|
{
|
||||||
GTimeZone *tz = g_time_zone_new_local();
|
|
||||||
|
|
||||||
GDateTime *now = g_date_time_new_now_local();
|
GDateTime *now = g_date_time_new_now_local();
|
||||||
GDateTime *log_date = g_date_time_new(tz,
|
GDateTime *log_date = g_date_time_new(tz,
|
||||||
g_date_time_get_year(session_started),
|
g_date_time_get_year(session_started),
|
||||||
@ -348,8 +346,6 @@ chat_log_get_previous(const gchar * const login, const gchar * const recipient,
|
|||||||
log_date = g_date_time_ref(next);
|
log_date = g_date_time_ref(next);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_time_zone_unref(tz);
|
|
||||||
|
|
||||||
return history;
|
return history;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user