From a70e19a51423b855b9da8d7f9ed40d396a534c67 Mon Sep 17 00:00:00 2001 From: rbuj Date: Mon, 20 Jan 2020 16:00:37 +0100 Subject: Fix year 2038 issue with signed 32-bit integers GTime is defined to always be a signed 32-bit integer, it will overflow in the year 2038. --- properties/ev-properties-view.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'properties') diff --git a/properties/ev-properties-view.c b/properties/ev-properties-view.c index 709b7c27..e6d703c7 100644 --- a/properties/ev-properties-view.c +++ b/properties/ev-properties-view.c @@ -342,12 +342,12 @@ ev_properties_view_set_info (EvPropertiesView *properties, const EvDocumentInfo if (info->fields_mask & EV_DOCUMENT_INFO_CREATOR) { set_property (properties, GTK_GRID (grid), CREATOR_PROPERTY, info->creator, &row); } - if (info->fields_mask & EV_DOCUMENT_INFO_CREATION_DATE) { + if ((info->fields_mask & EV_DOCUMENT_INFO_CREATION_DATE) && (info->creation_date > 0)) { text = ev_document_misc_format_date (info->creation_date); set_property (properties, GTK_GRID (grid), CREATION_DATE_PROPERTY, text, &row); g_free (text); } - if (info->fields_mask & EV_DOCUMENT_INFO_MOD_DATE) { + if ((info->fields_mask & EV_DOCUMENT_INFO_MOD_DATE) && (info->modified_date > 0)) { text = ev_document_misc_format_date (info->modified_date); set_property (properties, GTK_GRID (grid), MOD_DATE_PROPERTY, text, &row); g_free (text); -- cgit v1.2.1