Skip to content
Snippets Groups Projects
Commit 68de3ac1 authored by Mike Greiling's avatar Mike Greiling
Browse files

display system timezone underneath activity calendar

parent 037b3729
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -151,12 +151,17 @@ export default class UserTabs {
const calendarPath = $calendarWrap.data('calendarPath');
const calendarActivitiesPath = $calendarWrap.data('calendarActivitiesPath');
const utcOffset = $calendarWrap.data('utcOffset');
let utcFormatted = 'UTC';
if (utcOffset !== 0) {
utcFormatted = `UTC${utcOffset > 0 ? '+' : ''}${(utcOffset / 3600)}`;
}
 
$.ajax({
dataType: 'json',
url: calendarPath,
success: (activityData) => {
$calendarWrap.html(CALENDAR_TEMPLATE);
$calendarWrap.find('.calendar-hint').append(`(Timezone: ${utcFormatted})`);
 
// eslint-disable-next-line no-new
new ActivityCalendar('.js-contrib-calendar', activityData, calendarActivitiesPath, utcOffset);
Loading
Loading
Loading
Loading
@@ -45,6 +45,7 @@
margin-top: -23px;
float: right;
font-size: 12px;
direction: ltr;
}
 
.pika-single.gitlab-theme {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment