-
Notifications
You must be signed in to change notification settings - Fork 664
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
[SITE] display time in local user time zone #14405
base: main
Are you sure you want to change the base?
Conversation
- add local user time zone - add offset from UTC to convert - convert event time to user time zone - add several examples to demo Signed-off-by: Toshaan Bharvani <[email protected]>
✅ Deploy Preview for devopsdays-web ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Signed-off-by: Toshaan Bharvani <[email protected]>
What happens with events that do not have the offset? |
|
What happens if there's a summer/winter time shift during an event? |
If you use |
This seems good! There's a merge conflict that needs resolution @toshywoshy and then I'll merge it We do need to update the REFERENCE.md with the new fields too. |
I think i fixed that :) |
Signed-off-by: Matty Stratton <[email protected]>
themes/devopsdays-theme/reference.md
Outdated
@@ -65,6 +65,8 @@ All dates are in unquoted YYYY-MM-DD, like this: `variable: 2016-01-05`, or like | |||
|-------------------------|------------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------| | |||
| `startdate` | YYYY-MM-DD | No | The start date of your event. Leave blank if you don't have a venue reserved yet. | 2016-01-05 | | |||
| `enddate` | YYYY-MM-DD | No | The end date of your event. Leave blank if you don't have a venue reserved yet. | 2016-01-05 | | |||
| `timeoffset` | YYYY-MM-DD | No | The offset of the timezone of your event from UTC | "-0600" | | |||
| `timezone` | YYYY-MM-DD | No | The timezone of the event | "Europe/London" | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@toshywoshy probably good to clarify the acceptable values (point to a website that has the list, etc? not sure where!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The list of acceptable timezone values are here (column TZ identifier
): https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, @mattstratton while I presumed we all know the correct TZ identifiers, it needs to be specified in the documentation, as some of them are not always as straightforward
As @jerdog already pointed out Wikipedia has a list of acceptable values.
I have updated the reference file accordingly
Signed-off-by: Toshaan Bharvani <[email protected]>
Fixes #9819
This solves issue #9819 and provides a way to display user local time for the program for
start_time
andend_time
.It uses the users browser defined time zone, and provide the timezone name and the time based.
An event needs to add
timeoffset: "+0200"
to indicate the offset of the timezone against UTC.Please note that this value needs to be quoted as a string.
Here are some examples, which have also added into this commit