mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
fix(calendar): Fix Out of range value for column 'c_startdate' SQL error. Add log.
This commit is contained in:
@@ -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"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user