Skip to content

Commit

Permalink
fix(rental): format time as fake utc before saving (#65)
Browse files Browse the repository at this point in the history
Co-authored-by: Rohit Kumbhar <[email protected]>
  • Loading branch information
rohitkumbhar and Rohit Kumbhar authored Feb 17, 2025
1 parent 00a4ce5 commit 15250fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/trip/transportation/CarRentalForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useTranslation } from 'react-i18next';
import { createTransportationEntry, saveTransportationAttachments } from '../../../lib/api';
import { updateTransportation } from '../../../lib/api/pocketbase/trips.ts';
import { useCurrentUser } from '../../../auth/useCurrentUser.ts';
import { fakeAsUtcString } from '../../../lib/time.ts';

export const CarRentalForm = ({
trip,
Expand Down Expand Up @@ -52,8 +53,8 @@ export const CarRentalForm = ({
value: values.cost,
currency: values.currencyCode,
},
departureTime: values.pickupTime,
arrivalTime: values.dropOffTime,
departureTime: fakeAsUtcString(values.pickupTime),
arrivalTime: fakeAsUtcString(values.dropOffTime),
metadata: {
confirmationCode: values.confirmationCode,
rentalCompany: values.rentalCompany,
Expand Down

0 comments on commit 15250fe

Please sign in to comment.