🐛 Fix mixed UTC logic
This commit is contained in:
parent
d6a5d65d88
commit
92a97edd3c
@ -113,7 +113,7 @@ export class TripsComponent implements OnInit {
|
||||
const tripDays: Partial<TripDay>[] = [];
|
||||
const current = new Date(from);
|
||||
while (current <= to) {
|
||||
const year = current.getUTCFullYear();
|
||||
const year = current.getFullYear();
|
||||
const month = String(current.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(current.getDate()).padStart(2, '0');
|
||||
const label = `${day} ${months[current.getMonth()]}`;
|
||||
|
||||
@ -36,7 +36,7 @@ export class TripCreateDayModalComponent {
|
||||
}
|
||||
|
||||
formatDateWithoutTimezone(date: Date) {
|
||||
const year = date.getUTCFullYear();
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user