Skip to content
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

Merged
merged 9 commits into from
Jul 22, 2018
Merged

Dates are now stored in UTC #1491

merged 9 commits into from
Jul 22, 2018

Conversation

djaiss
Copy link
Member

@djaiss djaiss commented Jun 16, 2018

No description provided.

@djaiss djaiss requested a review from asbiin June 19, 2018 14:14
Copy link
Member

@asbiin asbiin left a 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...

@djaiss
Copy link
Member Author

djaiss commented Jul 1, 2018

@asbiin could you review this?

Copy link
Member

@asbiin asbiin left a 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();
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

{
$now = Carbon::now($timezone);
$now = Carbon::now();
Copy link
Member

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

Copy link
Member Author

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();
Copy link
Member

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 ?

Copy link
Member Author

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.

Copy link
Member

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

@djaiss djaiss assigned djaiss and unassigned asbiin Jul 10, 2018
This was referenced Jul 21, 2018
@djaiss djaiss merged commit 341ee04 into master Jul 22, 2018
@djaiss djaiss deleted the 2018-06-16-dates-in-utc branch July 24, 2018 10:57
@github-actions
Copy link

github-actions bot commented Feb 5, 2021

This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants