shell: Replace another GTimeVal

This slipped through in commit 9b7f228f8e.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/709
This commit is contained in:
Florian Müllner 2019-09-10 04:40:15 +02:00 committed by Florian Müllner
parent dcf7bae6c7
commit a030c54661

View File

@ -144,13 +144,9 @@ shell_util_format_date (const char *format,
gint64 time_ms)
{
GDateTime *datetime;
GTimeVal tv;
char *result;
tv.tv_sec = time_ms / 1000;
tv.tv_usec = (time_ms % 1000) * 1000;
datetime = g_date_time_new_from_timeval_local (&tv);
datetime = g_date_time_new_from_unix_local (time_ms / 1000);
if (!datetime) /* time_ms is out of range of GDateTime */
return g_strdup ("");