]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-18919 Pass timezone when filtering profile changelog
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Thu, 4 May 2023 08:55:18 +0000 (10:55 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 5 May 2023 20:03:00 +0000 (20:03 +0000)
server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx

index 2d99c5cb61a5cfe1cc1bb6628105a8dce369e443..1930cd4ad096ed012cdb19ecd366a6dc8b127915 100644 (file)
@@ -21,7 +21,7 @@ import * as React from 'react';
 import { getProfileChangelog } from '../../../api/quality-profiles';
 import { Location, Router, withRouter } from '../../../components/hoc/withRouter';
 import DeferredSpinner from '../../../components/ui/DeferredSpinner';
-import { parseDate, toShortISO8601String } from '../../../helpers/dates';
+import { parseDate, toISO8601WithOffsetString } from '../../../helpers/dates';
 import { translate } from '../../../helpers/l10n';
 import { withQualityProfilesContext } from '../qualityProfilesContext';
 import { Profile, ProfileChangelogEvent } from '../types';
@@ -117,8 +117,8 @@ export class ChangelogContainer extends React.PureComponent<Props, State> {
 
   handleDateRangeChange = ({ from, to }: { from?: Date; to?: Date }) => {
     const path = getProfileChangelogPath(this.props.profile.name, this.props.profile.language, {
-      since: from && toShortISO8601String(from),
-      to: to && toShortISO8601String(to),
+      since: from && toISO8601WithOffsetString(from),
+      to: to && toISO8601WithOffsetString(to),
     });
     this.props.router.push(path);
   };