I want to Display all time in same timezone

We are storing all date time values in UTC but need to display all values in a single timezone. The company runs on EST/EDT for simplicity of operations (for main office). The config app.timezone is UTC but I want entry and display in EST/EDT. Every user regardless of local timezone. DO I just add
->timezone('America/New_York')
->timezone('America/New_York')
to every field with
->date()
->date()
and
DatePicker::make('created_from')
DatePicker::make('created_from')
OR is there a global way to do this?
2 Replies
ddoddsr
ddoddsrOP5mo ago
I'm giving thi a try for the DateTimePicker and it works.
DateTimePicker::configureUsing(function (DateTimePicker $dateTimePicker): void {
$dateTimePicker->timezone('America/New_York');
});
DateTimePicker::configureUsing(function (DateTimePicker $dateTimePicker): void {
$dateTimePicker->timezone('America/New_York');
});
To set a detault for
Tables\Columns\TextColumn
Tables\Columns\TextColumn
I used
TextColumn::configureUsing(function (TextColumn $textColumn): void {
$textColumn->timezone('America/New_York');
});
TextColumn::configureUsing(function (TextColumn $textColumn): void {
$textColumn->timezone('America/New_York');
});
Want results from more Discord servers?
Add your server