Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LabraDoor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIP
Labrador
LabraDoor
Merge requests
!26
Set timestamp to use UTC
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Set timestamp to use UTC
8-change-epoch-timestamp-to-be-utc-time
into
development
Overview
0
Commits
1
Pipelines
7
Changes
1
Merged
Set timestamp to use UTC
Chris Lemaire
requested to merge
8-change-epoch-timestamp-to-be-utc-time
into
development
May 25, 2020
Overview
0
Commits
1
Pipelines
7
Changes
1
Closes
#8 (closed)
0
0
Merge request reports
Compare
development
version 1
d3b4ac6a
May 25, 2020
development (base)
and
latest version
latest version
62031136
1 commit,
May 25, 2020
version 1
d3b4ac6a
1 commit,
May 25, 2020
1 file
+
4
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/main/java/nl/tudelft/labracore/lib/LabracoreApiConfig.java
+
4
−
2
View file @ 62031136
Edit in single-file editor
Open in Web IDE
Show full file
@@ -17,9 +17,11 @@
*/
package
nl.tudelft.labracore.lib
;
import
static
java
.
time
.
LocalDateTime
.
now
;
import
java.net.InetAddress
;
import
java.time.ZoneOffset
;
import
java.util.Base64
;
import
java.util.Date
;
import
java.util.UUID
;
import
javax.crypto.Mac
;
@@ -106,7 +108,7 @@ public class LabracoreApiConfig {
* contains the right Authorization, Signature, Host and Date headers.
*/
private
final
ExchangeFilterFunction
apiKeyFilter
=
(
request
,
next
)
->
{
String
epochTimestamp
=
n
ew
Date
().
getTime
()
+
""
;
String
epochTimestamp
=
n
ow
().
toInstant
(
ZoneOffset
.
UTC
).
toEpochMilli
()
+
""
;
String
method
=
request
.
method
().
name
();
String
path
=
request
.
url
().
getPath
();
String
userId
=
request
.
headers
().
getFirst
(
"User-Id"
);
Loading