From 1a257c7768fb9010db32e050650693d26f3e5a29 Mon Sep 17 00:00:00 2001 From: smizrahi Date: Mon, 11 Sep 2023 11:34:04 +0200 Subject: [PATCH] fix(calendar): Fix Out of range value for column 'c_startdate' SQL error. Add log. --- SOPE/GDLContentStore/GCSFolder.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SOPE/GDLContentStore/GCSFolder.m b/SOPE/GDLContentStore/GCSFolder.m index 84e86728d..56e0e236e 100644 --- a/SOPE/GDLContentStore/GCSFolder.m +++ b/SOPE/GDLContentStore/GCSFolder.m @@ -1149,10 +1149,12 @@ andAttribute: (EOAttribute *)_attribute startDate = [theComponent startDate]; t = [startDate timeIntervalSince1970]; if (startDate) { - if (t < (long long)INT_MAX && t > (long long)INT_MIN) + if (t < (long long)INT_MAX && t > (long long)INT_MIN) { [quickRow setObject:[NSNumber numberWithInt: t] forKey:@"c_startdate"]; - else + } else { + [self errorWithFormat:@"Unexpected value. Invalid start date for timestamp %f", t]; [quickRow setObject:[NSNumber numberWithInt: 0] forKey:@"c_startdate"]; + } } }