Skip to content

Commit 0a51efe

Browse files
committed
Merge branch 'develop'
2 parents 7416c9d + 75ae3d5 commit 0a51efe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sope-gdl1/PostgreSQL/NSCalendarDate+PGVal.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ @implementation NSCalendarDate(PostgreSQL72Values)
3636
/*
3737
Format: '2001-07-26 14:00:00+02' (len 22)
3838
'2001-07-26 14:00:00+09:30' (len 25)
39+
those can have .1 to .999999 (microseconds)
40+
'2008-01-31 14:00:57.2+01' (len 24)
3941
'2008-01-31 14:00:57.249+01' (len 26)
4042
'2024-11-25 16:01:36.549802+00' (len 29) hh(2024-11-26)
4143
0123456789012345678901234
@@ -64,7 +66,7 @@ + (id)valueFromCString:(const char *)_cstr length:(int)_length
6466
if (_length == 0)
6567
return nil;
6668

67-
if (_length != 22 && _length != 25 && _length != 26 && _length != 29) {
69+
if (_length != 22 && _length != 25 && !(_length >= 24 && _length <= 29)) {
6870
// TODO: add support for "2001-07-26 14:00:00" (len=19)
6971
// TBD: add support for "2008-01-31 14:00:57.249+01" (len=26)
7072
NSLog(@"ERROR(%s): unexpected string '%s' for date type '%@' "

0 commit comments

Comments
 (0)