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
f444b154
Commit
f444b154
authored
2 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
DOC: add helpful comments
parent
6c9819c2
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!69
BUG: setup timezone in deploy
Pipeline
#29025
failed
2 years ago
Stage: info
Stage: setup
Stage: test
Stage: deploy
Changes
1
Pipelines
31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/caosdb/datetime/UTCTimeZoneShift.java
+4
-2
4 additions, 2 deletions
src/main/java/org/caosdb/datetime/UTCTimeZoneShift.java
with
4 additions
and
2 deletions
src/main/java/org/caosdb/datetime/UTCTimeZoneShift.java
+
4
−
2
View file @
f444b154
...
...
@@ -127,15 +127,17 @@ public class UTCTimeZoneShift extends TimeZone {
}
/**
* Generate an ISO 8601 time zone offset string
(e.g. +0200) from the given raw offset in
*
milliseconds.
* Generate an ISO 8601 time zone offset string
*
(e.g. +0200) for the current time
*
* @param timezone - the time zone in question.
* @return ISO 8601 time zone offset.
*/
public
static
String
getISO8601Offset
(
TimeZone
timezone
)
{
int
divisor
=
1000
*
60
*
60
;
// get the offset of the given timezone to UTC at the current time
int
offset
=
timezone
.
getOffset
(
System
.
currentTimeMillis
());
// convert the ms to the ISO format
int
sign
=
Integer
.
signum
(
offset
);
int
h
=
Integer
.
divideUnsigned
(
sign
*
offset
,
divisor
);
int
m
=
Integer
.
remainderUnsigned
(
sign
*
offset
,
divisor
);
...
...
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