summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libappstream-glib/as-app-validate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libappstream-glib/as-app-validate.c b/libappstream-glib/as-app-validate.c
index 5780f31..0f9b2cf 100644
--- a/libappstream-glib/as-app-validate.c
+++ b/libappstream-glib/as-app-validate.c
@@ -836,6 +836,7 @@ as_app_validate_release (AsApp *app,
guint number_para_max = 10;
guint number_para_min = 1;
gboolean required_timestamp = TRUE;
+ const guint64 MAX_TZ_OFFSET = 14 * 60 * 60; /* UTC+14 is the biggest offset */
/* relax the requirements a bit */
if ((helper->flags & AS_APP_VALIDATE_FLAG_RELAX) > 0) {
@@ -870,7 +871,7 @@ as_app_validate_release (AsApp *app,
}
/* check the timestamp is not in the future */
- if (timestamp > (guint64) g_get_real_time () / G_USEC_PER_SEC) {
+ if (timestamp > (guint64) g_get_real_time () / G_USEC_PER_SEC + MAX_TZ_OFFSET) {
ai_app_validate_add (helper,
AS_PROBLEM_KIND_ATTRIBUTE_INVALID,
"<release> timestamp is in the future");