Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-server
Commits
b9052587
Commit
b9052587
authored
3 years ago
by
Florian Spreckelsen
Browse files
Options
Downloads
Plain Diff
Merge branch 'f-date-time' into 'dev'
FIX
#183
See merge request
!37
parents
45cf506d
5293a4d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!41
REL: update changelog, bump version of pom.xml, update DEPENDENCIES
,
!37
FIX #183
Pipeline
#14355
passed
3 years ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+2
-0
2 additions, 0 deletions
CHANGELOG.md
src/main/java/org/caosdb/server/datatype/DateTimeDatatype.java
+11
-4
11 additions, 4 deletions
...ain/java/org/caosdb/server/datatype/DateTimeDatatype.java
with
13 additions
and
4 deletions
CHANGELOG.md
+
2
−
0
View file @
b9052587
...
...
@@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
*
#183 No reasonable error when using bad datetime format.
(https://gitlab.indiscale.com/caosdb/src/caosdb-server/-/issues/183)
*
#127 "nan" as value (list item) in properties with data type "LIST
<DOUBLE>
"
return with "Cannot parse value to double" error.
*
#170 Updating an abstract list-type property with a default value fails with
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/caosdb/server/datatype/DateTimeDatatype.java
+
11
−
4
View file @
b9052587
...
...
@@ -37,12 +37,19 @@ public class DateTimeDatatype extends AbstractDatatype {
try
{
if
(
value
instanceof
UTCDateTime
||
value
instanceof
Date
)
{
return
(
DateTimeInterface
)
value
;
}
else
if
(
value
instanceof
GenericValue
)
{
return
DateTimeFactory2
.
valueOf
(((
GenericValue
)
value
).
toDatabaseString
());
}
DateTimeInterface
result
;
if
(
value
instanceof
GenericValue
)
{
result
=
DateTimeFactory2
.
valueOf
(((
GenericValue
)
value
).
toDatabaseString
());
}
else
{
re
turn
DateTimeFactory2
.
valueOf
(
value
.
toString
());
re
sult
=
DateTimeFactory2
.
valueOf
(
value
.
toString
());
}
}
catch
(
final
IllegalArgumentException
e
)
{
// Test if this is storable
result
.
toDatabaseString
();
return
result
;
}
catch
(
final
UnsupportedOperationException
|
IllegalArgumentException
e
)
{
throw
ServerMessages
.
CANNOT_PARSE_DATETIME_VALUE
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment