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:
parent
dcf7bae6c7
commit
a030c54661
@ -144,13 +144,9 @@ shell_util_format_date (const char *format,
|
|||||||
gint64 time_ms)
|
gint64 time_ms)
|
||||||
{
|
{
|
||||||
GDateTime *datetime;
|
GDateTime *datetime;
|
||||||
GTimeVal tv;
|
|
||||||
char *result;
|
char *result;
|
||||||
|
|
||||||
tv.tv_sec = time_ms / 1000;
|
datetime = g_date_time_new_from_unix_local (time_ms / 1000);
|
||||||
tv.tv_usec = (time_ms % 1000) * 1000;
|
|
||||||
|
|
||||||
datetime = g_date_time_new_from_timeval_local (&tv);
|
|
||||||
if (!datetime) /* time_ms is out of range of GDateTime */
|
if (!datetime) /* time_ms is out of range of GDateTime */
|
||||||
return g_strdup ("");
|
return g_strdup ("");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user