Skip to content

Commit

Permalink
use UTC timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiyvamz committed Dec 4, 2024
1 parent 2d73bef commit 9dae1ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ public class LightRdsUtility implements IamTokenUtility {
private final Clock clock;

public LightRdsUtility() {
this.clock = Clock.systemDefaultZone();
this.clock = Clock.systemUTC();
}

// For testing only
public LightRdsUtility(final Instant fixedInstant) {
this.clock = Clock.fixed(fixedInstant, ZoneId.systemDefault());
this.clock = Clock.fixed(fixedInstant, ZoneId.of("UTC"));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ public static DefaultRdsUtilities getDefaultRdsUtilities(
final DefaultBuilder builder = (DefaultBuilder) new DefaultBuilder()
.credentialsProvider(credentialsProvider)
.region(region);
return new DefaultRdsUtilities(builder, Clock.fixed(fixedInstant, ZoneId.systemDefault()));
return new DefaultRdsUtilities(builder, Clock.fixed(fixedInstant, ZoneId.of("UTC")));
}
}

0 comments on commit 9dae1ed

Please sign in to comment.