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

Replace moment by moment-timezone #799

Merged
merged 3 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/component/AirportCheckInLeg.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import { FormattedMessage, intlShape } from 'react-intl';
import moment from 'moment';
import moment from 'moment-timezone';
import { Link } from 'found';
import ItineraryCircleLine from './ItineraryCircleLine';
import Icon from './Icon';
Expand Down
2 changes: 1 addition & 1 deletion app/component/AirportCollectLuggageLeg.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import { FormattedMessage, intlShape } from 'react-intl';
import moment from 'moment';
import moment from 'moment-timezone';
import { Link } from 'found';
import ItineraryCircleLine from './ItineraryCircleLine';
import Icon from './Icon';
Expand Down
2 changes: 1 addition & 1 deletion app/component/BicycleLeg.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import moment from 'moment';
import moment from 'moment-timezone';
import { FormattedMessage, intlShape } from 'react-intl';
import cx from 'classnames';
import Link from 'found/Link';
Expand Down
2 changes: 1 addition & 1 deletion app/component/BikeParkLeg.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import cx from 'classnames';
import React from 'react';
import moment from 'moment';
import moment from 'moment-timezone';
import { Link } from 'found';
import { FormattedMessage, intlShape } from 'react-intl';
import { displayDistance } from '../util/geo-utils';
Expand Down
2 changes: 1 addition & 1 deletion app/component/CallAgencyLeg.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import Link from 'found/Link';
import moment from 'moment';
import moment from 'moment-timezone';
import { FormattedMessage } from 'react-intl';

import RouteNumber from './RouteNumber';
Expand Down
2 changes: 1 addition & 1 deletion app/component/CarLeg.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import moment from 'moment';
import moment from 'moment-timezone';
import { FormattedMessage, intlShape } from 'react-intl';

import Icon from './Icon';
Expand Down
2 changes: 1 addition & 1 deletion app/component/CarParkLeg.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import moment from 'moment';
import moment from 'moment-timezone';
import { FormattedMessage, intlShape } from 'react-intl';
import cx from 'classnames';

Expand Down
2 changes: 1 addition & 1 deletion app/component/CarpoolLeg.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import { FormattedMessage, intlShape } from 'react-intl';
import moment from 'moment';
import moment from 'moment-timezone';
import React from 'react';
import cx from 'classnames';
import { displayDistance } from '../util/geo-utils';
Expand Down
2 changes: 1 addition & 1 deletion app/component/CarpoolOffer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { intlShape, FormattedMessage, FormattedHTMLMessage } from 'react-intl';
import Moment from 'moment';
import Moment from 'moment-timezone';
import { routerShape } from 'found';
import Icon from './Icon';
import Checkbox from './Checkbox';
Expand Down
2 changes: 1 addition & 1 deletion app/component/DelayedTime.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import cx from 'classnames';
import moment from 'moment';
import moment from 'moment-timezone';
import React from 'react';
import PropTypes from 'prop-types';
import { legHasCancelation } from '../util/alertUtils';
Expand Down
2 changes: 1 addition & 1 deletion app/component/DepartureRow.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import moment from 'moment';
import moment from 'moment-timezone';
import { intlShape } from 'react-intl';
import { v4 as uuid } from 'uuid';
import { Link } from 'found';
Expand Down
2 changes: 1 addition & 1 deletion app/component/EndLeg.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import moment from 'moment';
import moment from 'moment-timezone';
import cx from 'classnames';
import { matchShape } from 'found';

Expand Down
2 changes: 1 addition & 1 deletion app/component/IndexPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import isEqual from 'lodash/isEqual';
import DTAutoSuggest from '@digitransit-component/digitransit-component-autosuggest';
import DTAutosuggestPanel from '@digitransit-component/digitransit-component-autosuggest-panel';
import { getModesWithAlerts } from '@digitransit-search-util/digitransit-search-util-query-utils';
import moment from 'moment';
import moment from 'moment-timezone';
import storeOrigin from '../action/originActions';
import storeDestination from '../action/destinationActions';
import withSearchContext from './WithSearchContext';
Expand Down
2 changes: 1 addition & 1 deletion app/component/IntermediateLeg.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import cx from 'classnames';
import moment from 'moment';
import moment from 'moment-timezone';
import PropTypes from 'prop-types';
import React from 'react';
import Link from 'found/Link';
Expand Down
2 changes: 1 addition & 1 deletion app/component/LocalTime.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import moment from 'moment';
import moment from 'moment-timezone';
import PropTypes from 'prop-types';

const LocalTime = ({ forceUtc, time }) => {
Expand Down
2 changes: 1 addition & 1 deletion app/component/RelativeDuration.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import moment from 'moment';
import moment from 'moment-timezone';
import { FormattedMessage, intlShape } from 'react-intl';

function RelativeDuration(props) {
Expand Down
2 changes: 1 addition & 1 deletion app/component/RouteAlertsRow.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable jsx-a11y/no-noninteractive-tabindex */
import cx from 'classnames';
import capitalize from 'lodash/capitalize';
import moment from 'moment';
import moment from 'moment-timezone';
import PropTypes from 'prop-types';
import React from 'react';
import { intlShape } from 'react-intl';
Expand Down
2 changes: 1 addition & 1 deletion app/component/RoutePageControlPanel.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable import/no-unresolved */
import moment from 'moment';
import moment from 'moment-timezone';
import PropTypes from 'prop-types';
import React from 'react';
import { FormattedMessage, intlShape } from 'react-intl';
Expand Down
2 changes: 1 addition & 1 deletion app/component/RouteScheduleContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
import { createFragmentContainer, graphql } from 'react-relay';
import { matchShape, routerShape, RedirectException } from 'found';
import moment from 'moment';
import moment from 'moment-timezone';
import { intlShape, FormattedMessage } from 'react-intl';
import sortBy from 'lodash/sortBy';
import cx from 'classnames';
Expand Down
2 changes: 1 addition & 1 deletion app/component/RouteStopListContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import groupBy from 'lodash/groupBy';
import values from 'lodash/values';
import cx from 'classnames';
import { FormattedMessage } from 'react-intl';
import moment from 'moment';
import moment from 'moment-timezone';

import RouteStop from './RouteStop';
import withBreakpoint from '../util/withBreakpoint';
Expand Down
2 changes: 1 addition & 1 deletion app/component/StopPageTabs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import cx from 'classnames';
import moment from 'moment';
import moment from 'moment-timezone';
import PropTypes from 'prop-types';
import React, { useState, useRef } from 'react';
import { FormattedMessage, intlShape } from 'react-intl';
Expand Down
2 changes: 1 addition & 1 deletion app/component/StopTimetablePage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { createRefetchContainer, graphql } from 'react-relay';
import moment from 'moment';
import moment from 'moment-timezone';

import { matchShape, routerShape } from 'found';
import { prepareServiceDay } from '../util/dateParamUtils';
Expand Down
2 changes: 1 addition & 1 deletion app/component/SummaryPage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable react/no-array-index-key */
/* eslint-disable no-nested-ternary */
import PropTypes from 'prop-types';
import moment from 'moment';
import moment from 'moment-timezone';
import React from 'react';
import {
createRefetchContainer,
Expand Down
2 changes: 1 addition & 1 deletion app/component/SummaryPlanContainer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-nested-ternary */
import connectToStores from 'fluxible-addons-react/connectToStores';
import moment from 'moment';
import moment from 'moment-timezone';
import PropTypes from 'prop-types';
import React from 'react';
import {
Expand Down
2 changes: 1 addition & 1 deletion app/component/SummaryRow.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import cx from 'classnames';
import moment from 'moment';
import moment from 'moment-timezone';
import PropTypes from 'prop-types';
import React from 'react';
import { FormattedMessage, intlShape } from 'react-intl';
Expand Down
2 changes: 1 addition & 1 deletion app/component/TerminalTimetablePage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { createRefetchContainer, graphql } from 'react-relay';
import moment from 'moment';
import moment from 'moment-timezone';

import { matchShape, routerShape } from 'found';
import { prepareServiceDay } from '../util/dateParamUtils';
Expand Down
2 changes: 1 addition & 1 deletion app/component/TicketInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react';
import { FormattedMessage, FormattedHTMLMessage, intlShape } from 'react-intl';

import { v4 as uuid } from 'uuid';
import Moment from 'moment';
import Moment from 'moment-timezone';
import ExternalLink from './ExternalLink';
import { renderZoneTicket } from './ZoneTicket';
import { getAlternativeFares } from '../util/fareUtils';
Expand Down
2 changes: 1 addition & 1 deletion app/component/TimeFrame.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import moment from 'moment';
import moment from 'moment-timezone';

import { TIME_PATTERN, DATE_PATTERN } from '../util/timeUtils';

Expand Down
2 changes: 1 addition & 1 deletion app/component/Timetable.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import moment from 'moment';
import moment from 'moment-timezone';
import uniqBy from 'lodash/uniqBy';
import sortBy from 'lodash/sortBy';
import groupBy from 'lodash/groupBy';
Expand Down
2 changes: 1 addition & 1 deletion app/component/TimetableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import moment from 'moment';
import moment from 'moment-timezone';
import { intlShape } from 'react-intl';

const TimetableRow = ({ title, stoptimes, showRoutes, timerows }, { intl }) => (
Expand Down
2 changes: 1 addition & 1 deletion app/component/TransitLeg.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import cx from 'classnames';
import moment from 'moment';
import moment from 'moment-timezone';
import PropTypes from 'prop-types';
import React from 'react';
import { FormattedMessage, intlShape } from 'react-intl';
Expand Down
2 changes: 1 addition & 1 deletion app/component/TripStopListContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import isEmpty from 'lodash/isEmpty';
import connectToStores from 'fluxible-addons-react/connectToStores';
import groupBy from 'lodash/groupBy';
import values from 'lodash/values';
import moment from 'moment';
import moment from 'moment-timezone';
import { getRouteMode } from '../util/modeUtils';
import TripRouteStop from './TripRouteStop';
import withBreakpoint from '../util/withBreakpoint';
Expand Down
2 changes: 1 addition & 1 deletion app/component/ViaLeg.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import moment from 'moment';
import moment from 'moment-timezone';
import { FormattedMessage, intlShape } from 'react-intl';

import Icon from './Icon';
Expand Down
2 changes: 1 addition & 1 deletion app/component/WalkLeg.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import moment from 'moment';
import moment from 'moment-timezone';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
Expand Down
2 changes: 1 addition & 1 deletion app/component/WeatherDetailsPopup.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import moment from 'moment';
import moment from 'moment-timezone';
import Modal from '@hsl-fi/modal';
import { FormattedMessage, intlShape } from 'react-intl';

Expand Down
2 changes: 1 addition & 1 deletion app/component/map/StopPageMap.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React, { useEffect, useContext, useState } from 'react';
import { matchShape, routerShape } from 'found';
import moment from 'moment';
import moment from 'moment-timezone';
import { connectToStores } from 'fluxible-addons-react';
import distance from '@digitransit-search-util/digitransit-search-util-distance';
import { graphql, fetchQuery } from 'react-relay';
Expand Down
2 changes: 1 addition & 1 deletion app/component/map/StopsNearYouMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useEffect, useState, useRef } from 'react';
import PropTypes from 'prop-types';
import { matchShape } from 'found';
import { graphql, fetchQuery } from 'react-relay';
import moment from 'moment';
import moment from 'moment-timezone';
import uniqBy from 'lodash/uniqBy';
import compact from 'lodash/compact';
import indexOf from 'lodash/indexOf';
Expand Down
2 changes: 1 addition & 1 deletion app/component/map/VehicleMarkerContainer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import connectToStores from 'fluxible-addons-react/connectToStores';
import moment from 'moment';
import moment from 'moment-timezone';
import { ExtendedRouteTypes } from '../../constants';
import VehicleIcon from '../VehicleIcon';
import IconMarker from './IconMarker';
Expand Down
2 changes: 1 addition & 1 deletion app/component/map/popups/OSMOpeningHours.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import SimpleOpeningHours from 'simple-opening-hours';
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage, intlShape } from 'react-intl';
import moment from 'moment';
import moment from 'moment-timezone';
import Icon from '../../Icon';

export default class OSMOpeningHours extends React.Component {
Expand Down
2 changes: 1 addition & 1 deletion app/component/map/route/TripMarkerPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createFragmentContainer, graphql } from 'react-relay';

import Link from 'found/Link';
import { FormattedMessage } from 'react-intl';
import moment from 'moment';
import moment from 'moment-timezone';
import { PREFIX_ROUTES, PREFIX_STOPS } from '../../../util/path';

import RouteHeader from '../../RouteHeader';
Expand Down
2 changes: 1 addition & 1 deletion app/component/map/sidebar/RoadworksContent.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import moment from 'moment';
import moment from 'moment-timezone';
import { intlShape } from 'react-intl';
import withBreakpoint from '../../../util/withBreakpoint';
import SidebarContainer from './SidebarContainer';
Expand Down
2 changes: 1 addition & 1 deletion app/component/map/sidebar/WeatherStationContent.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import { FormattedMessage, intlShape } from 'react-intl';
import moment from 'moment';
import moment from 'moment-timezone';
import { isNumber } from 'lodash';
import SidebarContainer from './SidebarContainer';

Expand Down
2 changes: 1 addition & 1 deletion app/configurations/config.stadtnavi.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { MapMode } from '../constants';
const CONFIG = 'stadtnavi';
const APP_TITLE = 'stadtnavi Herrenberg';
const APP_DESCRIPTION = 'Gemeinsam Mobilität neu denken - die intermodale Verbindungssuche mit offenen, lokalen Daten';
const API_URL = process.env.API_URL || 'https://api.dev.stadtnavi.eu';
const API_URL = process.env.API_URL || 'https://api.stadtnavi.de';
const MAP_URL = process.env.MAP_URL || 'https://tiles.stadtnavi.eu/streets/{z}/{x}/{y}{r}.png';
const BIKE_MAP_URL = process.env.BIKE_MAP_URL ||'https://tiles.stadtnavi.eu/bicycle/{z}/{x}/{y}{r}.png';

Expand Down
2 changes: 1 addition & 1 deletion app/store/OldSearchesStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import find from 'lodash/find';
import get from 'lodash/get';
import isEqual from 'lodash/isEqual';
import orderBy from 'lodash/orderBy';
import moment from 'moment';
import moment from 'moment-timezone';

import { getNameLabel } from '@digitransit-search-util/digitransit-search-util-uniq-by-label';
import { getOldSearchesStorage, setOldSearchesStorage } from './localStorage';
Expand Down
2 changes: 1 addition & 1 deletion app/store/TimeStore.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Store from 'fluxible/addons/BaseStore';
import moment from 'moment';
import moment from 'moment-timezone';

class TimeStore extends Store {
static storeName = 'TimeStore';
Expand Down
2 changes: 1 addition & 1 deletion app/util/apiUtils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import moment from 'moment';
import moment from 'moment-timezone';
import xmlParser from 'fast-xml-parser';
import isEmpty from 'lodash/isEmpty';
import { retryFetch } from './fetchUtils';
Expand Down
2 changes: 1 addition & 1 deletion app/util/dateParamUtils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import moment from 'moment';
import moment from 'moment-timezone';

import { DATE_FORMAT } from '../constants';

Expand Down
2 changes: 1 addition & 1 deletion app/util/mqttClient.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ceil from 'lodash/ceil';
import moment from 'moment';
import moment from 'moment-timezone';
import { parseFeedMQTT } from './gtfsRtParser';
import { convertTo24HourFormat } from './timeUtils';

Expand Down
2 changes: 1 addition & 1 deletion app/util/patternUtils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import moment from 'moment';
import moment from 'moment-timezone';
/**
Helper for determining is current date in active dates.
Return false if pattern doesn't have active dates information available
Expand Down
Loading