Repository navigation
feat: show local time on profiles, opt-in - #803
Merged
Merged
Conversation
Adds a show_local_time setting next to the timezone. When on and a timezone is set, the profile shows the current time there with its UTC offset, like GitHub does. It is off by default and clearing the timezone turns it off.
Contributor
Author
|
Would you be interested in this opt-in local time feature for profiles? Happy to adjust the approach if you have a different direction in mind. |
Member
|
@nunomaduro I think this looks good, has a migration in it though so needs your call. |
Contributor
|
Since auto deploy is disabled, I'll merge this already and @nunomaduro you can take care of it when you're back |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Profiles can now show the person's current local time next to their location and website, like GitHub does, e.g.
11:06 (UTC +02:00).It is off by default. Settings → Timezone has a new checkbox, "Show my local time on my profile", which is only available while a timezone is set. Clearing the timezone turns it off, on the server too, so a profile never shows a time without a timezone behind it.
users.show_local_timeboolean, defaultfalse, saved together with the timezone through the existingPUT settings/timezone.LocalTimerenders nothing on the server and ticks every minute in the browser, so the server's clock is never shown as the reader's.Intl, so it follows daylight saving time. A zone without an offset readsUTC.Relates to #669, #737 (other open PRs on timezone and time formats). This reuses the timezone setting and does not touch their formatting.
Tests
composer testpasses except the 100% coverage step, which needs a coverage driver I don't have locally.Preview