mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
parent
6326080143
commit
9b6ccb3eef
1 changed files with 5 additions and 1 deletions
|
@ -301,7 +301,11 @@ fn data_pointers_to_primitives(data_pointers []&u8, types []int, field_types []F
|
||||||
}
|
}
|
||||||
.type_datetime, .type_timestamp {
|
.type_datetime, .type_timestamp {
|
||||||
string_time := unsafe { cstring_to_vstring(&char(data)) }
|
string_time := unsafe { cstring_to_vstring(&char(data)) }
|
||||||
primitive = time.parse(string_time)!
|
if string_time == '' {
|
||||||
|
primitive = orm.Null{}
|
||||||
|
} else {
|
||||||
|
primitive = time.parse(string_time)!
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {}
|
else {}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue