-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Dates are now stored in UTC #1491
Conversation
Signed-off-by: Regis Freyd <[email protected]>
Signed-off-by: Regis Freyd <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure with this already, I will review it next week if it's ok...
@asbiin could you review this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's great.
We should also migrate every created_at
and updated_at
entries, because they are stored according to the app.timezone timezone, using the current APP_DEFAULT_TIMEZONE
config set.
@@ -160,7 +160,7 @@ public function show(Contact $contact) | |||
$query->orderBy('updated_at', 'desc'); | |||
}]); | |||
|
|||
$contact->last_consulted_at = Carbon::now(auth()->user()->timezone); | |||
$contact->last_consulted_at = Carbon::now(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use the ǹow()
helper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
app/Models/Contact/Contact.php
Outdated
{ | ||
$now = Carbon::now($timezone); | ||
$now = Carbon::now(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use the ǹow()
helper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
public function up() | ||
{ | ||
Schema::table('users', function ($table) { | ||
$table->string('name_order')->default('firstname_lastname_nickname')->change(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has nothing to do with the UTC timezone, right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No indeed. It's a bug fix for something else. I should put it out and create a separate PR for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I have moved it in #1585
This pull request has been automatically locked since there |
No description provided.