Skip to content
Snippets Groups Projects
Unverified Commit 2667ea16 authored by Chuck Grindel's avatar Chuck Grindel Committed by GitHub
Browse files

fix: update cache record TTL to not account for Daylight Saving time (#21389)

parent bca8c202
Branches
Tags 32.154.3
No related merge requests found
......@@ -17,7 +17,9 @@ export class GithubGraphqlPackageCacheStrategy<
): Promise<void> {
if (this.hasUpdatedItems) {
const expiry = this.createdAt.plus({
days: AbstractGithubGraphqlCacheStrategy.cacheTTLDays,
// Not using 'days' as it does not handle adjustments for Daylight Saving time.
// The offset in the resulting DateTime object does not match that of the expiry or this.now.
hours: AbstractGithubGraphqlCacheStrategy.cacheTTLDays * 24,
});
const ttlMinutes = expiry.diff(this.now, ['minutes']).as('minutes');
if (ttlMinutes && ttlMinutes > 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment