Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the browser's timezone by default #22

Merged
merged 1 commit into from
May 9, 2018

Conversation

Wilfred
Copy link
Contributor

@Wilfred Wilfred commented May 2, 2018

Previously, we would default to 'system clock time' when no cookies
were set. Users would see UTC time unless they explicitly opted in to
the browser timezone.

This only impacts new users, or when the cookie expires.


setCookie(mode);
setCookie('true', 'local');
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me!

if (mode == 'local') {
options[mode].checked = true;
mode = 'system';
}
modes[mode].checked = true;

// Renew the cookie.
setCookie(mode);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this should have been removed? It was there to auto-renew the cookie, so that it only expires if the page has not been visited in 2 years as in https://googleblog.blogspot.com.au/2007/07/cookies-expiring-sooner-to-improve.html

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, thanks.

Previously, we would default to 'system clock time' when no cookies
were set. Users would see UTC time unless they explicitly opted in to
the browser timezone.

This only impacts new users, or when the cookie expires.
@Wilfred Wilfred force-pushed the local_timezone_by_default branch from b8b594f to b403d8e Compare May 8, 2018 10:48
@StevenGBrown StevenGBrown merged commit 5299d49 into jenkinsci:master May 9, 2018
@StevenGBrown
Copy link
Member

Thanks!

@StevenGBrown
Copy link
Member

Fixed included in Timestamper 1.8.10 which will be available shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants