Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DARIAH-DE OAI-PMH Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
DARIAH-DE
DARIAH-DE OAI-PMH Services
Commits
6e96f8e7
Commit
6e96f8e7
authored
2 years ago
by
Stefan E. Funk
Browse files
Options
Downloads
Patches
Plain Diff
fix: implement comments from mr
parent
8fa4d57a
No related branches found
No related tags found
No related merge requests found
Pipeline
#349589
passed
2 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
oaipmh-core/src/main/java/info/textgrid/middleware/OaipmhUtilities.java
+8
-4
8 additions, 4 deletions
...c/main/java/info/textgrid/middleware/OaipmhUtilities.java
with
8 additions
and
4 deletions
oaipmh-core/src/main/java/info/textgrid/middleware/OaipmhUtilities.java
+
8
−
4
View file @
6e96f8e7
...
...
@@ -155,18 +155,22 @@ public class OaipmhUtilities {
log
.
fine
(
"original DateTimeString: "
+
originalDateTimeString
);
Instant
instant
;
try
{
OffsetDateTime
odt
=
OffsetDateTime
.
parse
(
originalDateTimeString
);
result
=
UTC_FORMATTER
.
format
(
Instant
.
from
(
odt
)
)
;
instant
=
Instant
.
from
(
odt
);
}
// TODO We are missing to set time zones on dcterms date fields!! Workaround for all DARIAH-DE
// Repository dates so far is using LocalDateTime here!
// NOTE We are missing to set time zones on dcterms date fields in administrative metadata!
// Workaround for all DARIAH-DE Repository dates so far (until fix) is using LocalDateTime here
// with ZoneId CET, what has been local time zone until now!
catch
(
DateTimeParseException
e
)
{
LocalDateTime
ldt
=
LocalDateTime
.
parse
(
originalDateTimeString
);
result
=
UTC_FORMATTER
.
format
(
ldt
.
atZone
(
ZoneId
.
systemDefault
(
)).
toInstant
()
)
;
instant
=
ldt
.
atZone
(
ZoneId
.
of
(
"CET"
)).
toInstant
();
}
result
=
UTC_FORMATTER
.
format
(
instant
);
log
.
fine
(
"parsed to UTC: "
+
result
);
return
result
;
...
...
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