-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Labels
pendingIssues that are pending triageIssues that are pending triage
Milestone
Description
- Laravel Version: 8.83
- Nova Version: 3.30
- PHP Version: 8.0.17
- Database Driver & Version:
- Operating System and Version: Linux 5.4.0
- Browser type and version:
- Reproduction Repository:
Description:
The calculated date is correct for timezones in the eastern hemisphere (like Europe/Berlin
), but wrong by one day for UTC or timezones in the western hemisphere (like America/Chicago
).
The correct day should always be the first day of a month.
Detailed steps to reproduce the issue on a fresh Nova installation:
open tinker in terminal
>>> Illuminate\Support\Carbon::firstDayOfQuarter('Europe/Berlin');
=> Illuminate\Support\Carbon @1648764000 {#3922
date: 2022-04-01 00:00:00.0 Europe/Berlin (+02:00),
}
>>> Illuminate\Support\Carbon::firstDayOfQuarter();
=> Illuminate\Support\Carbon @1648684800 {#3918
date: 2022-03-31 00:00:00.0 UTC (+00:00),
}
>>> Illuminate\Support\Carbon::firstDayOfQuarter('America/Chicago');
=> Illuminate\Support\Carbon @1648702800 {#3919
date: 2022-03-31 00:00:00.0 America/Chicago (-05:00),
}
>>> Illuminate\Support\Carbon::firstDayOfPreviousQuarter('America/Chicago');
=> Illuminate\Support\Carbon @1640930400 {#3930
date: 2021-12-31 00:00:00.0 America/Chicago (-06:00),
}
>>> Illuminate\Support\Carbon::firstDayOfPreviousQuarter('Europe/Berlin');
=> Illuminate\Support\Carbon @1640991600 {#3918
date: 2022-01-01 00:00:00.0 Europe/Berlin (+01:00),
}
Metadata
Metadata
Assignees
Labels
pendingIssues that are pending triageIssues that are pending triage