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

[BC-Backport] Fixed incorrect datetime in block, ref #1525 #2940

Closed
wants to merge 5 commits into from

Conversation

sreichel
Copy link
Contributor

@sreichel sreichel commented Jan 15, 2023

Description (*)

New PR for #2854

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@github-actions github-actions bot added Component: Adminhtml Relates to Mage_Adminhtml Component: Core Relates to Mage_Core documentation labels Jan 15, 2023
@sreichel sreichel changed the title Replace 1525 Replace #1525 Jan 15, 2023
@github-actions
Copy link

Unit Test Results

7 tests   5 ✔️  0s ⏱️
1 suites  2 💤
1 files    0

Results for commit 43a91fb.

kiatng
kiatng previously approved these changes Jan 16, 2023
@Flyingmana
Copy link
Member

Flyingmana commented Jan 16, 2023

Replace #1525 #2940

Just as a hint, the Name of the PR is used for the merge commit and the changelog generation

@sreichel sreichel changed the title Replace #1525 [Backport] Fixed incorrect datetime in block, ref #1525 Jan 16, 2023
@sreichel sreichel changed the title [Backport] Fixed incorrect datetime in block, ref #1525 [Backport/Fix] Fixed incorrect datetime in block, ref #1525 Jan 16, 2023
@fballiano
Copy link
Contributor

@Flyingmana true, when I merge I always fix the commit description 😊

@sreichel sreichel changed the title [Backport/Fix] Fixed incorrect datetime in block, ref #1525 [BC-Backport] Fixed incorrect datetime in block, ref #1525 Jan 16, 2023
@Flyingmana Flyingmana removed their request for review January 18, 2023 03:10
matteotestoni
matteotestoni previously approved these changes Apr 5, 2023
@fballiano
Copy link
Contributor

let's please decide what to do with this, the readme has a conflict and it needs to be rebased.
if this is BC, since it's 4 months old, do we still need it? should it be on all branches since it's probably "broken" on 19.5.0-rcX?

@sreichel
Copy link
Contributor Author

Y, it should be on all branches,

@fballiano
Copy link
Contributor

then can you rebase it anyway? 1.9.4.x is a dead branch.

@sreichel
Copy link
Contributor Author

4 month ago 1.9.4.x was not EOL

You changed the rules. (please) deal with it,

@fballiano
Copy link
Contributor

we went thru a very long RFC process which was participated by many people and you've the courage to say I changed the rules. wow.

@fballiano fballiano dismissed stale reviews from matteotestoni and kiatng via b37e2c7 May 18, 2023 23:19
@fballiano
Copy link
Contributor

I was trying to rebase but I can't wrap my head around fixing the conflicts with the main branch how it is today

Screenshot 2023-05-19 alle 00 30 54

so if nobody wants to pick it up I guess the only option is to close it

@sreichel
Copy link
Contributor Author

by many people

So someome who carried this RFC should take care of old PRs to get merged.

@fballiano
Copy link
Contributor

maybe you didn't notice that my RFC got closed and the approved one is a totally different one. weird, if only you participated.

@fballiano
Copy link
Contributor

and btw I've rebased all of the PR myself alone, but for the few ones that I felt I couldn't fix, I stopped or closed the PR if it was abandoned. I mean, literally what else can I do?
instead, you're active, it would maybe take 10 minutes for you because you are very skilled, but you prefer to argue forever over nothing.

ah, maybe you don't remember that for something like a year I worked with the "v19 is the main branch" fixing all of the conflicts and cherry picking everything myself alone because that was the rule and I got told "if you want change, create an RFC". what, the, actual, heck, the courage you have to talk this way.

going to bed, good night to everybody reading this pointless discussion.

@sreichel
Copy link
Contributor Author

it would maybe take 10 minutes for you because you are very skilled

It takes you the same 10 minutes, because you are very skilled too.

I spent time to review PR #1525. I rewrote it to make it backward-compatible, I tested it, What else should i do?

With propper reviews this was no b/c-breaking change,

@fballiano
Copy link
Contributor

It takes you the same 10 minutes, because you are very skilled too.

I spent more but I wasn't sure of what to do. I'm far less skilled than many of the contributors here, but what I have for sure is that I work like a jackass

anyway, I'll try to do that, hoping not to break it

@fballiano
Copy link
Contributor

In the meanwhile I'm adding the original patch file, as a backup
2940.diff.txt

Comment on lines 186 to 191
$time = strtotime($date);
if ($time) {
$date = $locale->date($time, null, null, $useTimezone);
}
return '';
Copy link
Contributor

Choose a reason for hiding this comment

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

Screenshot 2023-05-23 alle 21 45 11

this is for sure a mistake because both $time and $date are not used since it returns ''

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. It should be

} else {
    return '';
}

Copy link
Contributor

Choose a reason for hiding this comment

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

that's more or less what I committed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You removed that part ... $date is used in return statement.

            $time = strtotime($date);
            if ($time) {
                $date = $locale->date($time, null, null, $useTimezone);
            }

if ($showTime) { changed ...

This PR was NOT for main branch. #1525 was applied to main only cause of changing method signature. It should have been reverted first and replaced by this one. ATM this PRs looks not correct anymore.

Copy link
Contributor

Choose a reason for hiding this comment

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

I understood that this PR was going to unify the same code on all branches, so main then ported to v19 and next, no?

Copy link
Contributor

Choose a reason for hiding this comment

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

You removed that part ... $date is used in return statement.

            $time = strtotime($date);
            if ($time) {
                $date = $locale->date($time, null, null, $useTimezone);
            }

I didn't understand, from the screenshot both $time and $date are not returned

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its not on your screenshot, but $date is used in last line of that method. (return $date->....)

Copy link
Contributor

Choose a reason for hiding this comment

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

I sencerely can't find that in the original diff https://github.com/OpenMage/magento-lts/files/11548215/2940.diff.txt it doesn't seem to me that that variable is needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fballiano fballiano changed the base branch from 1.9.4.x to main May 23, 2023 20:47
@ADDISON74 ADDISON74 self-assigned this Jul 14, 2023
@fballiano
Copy link
Contributor

If I'm not mistaken, the purpose of this PR was to reimplement #1525 in order to backport it to v19.

But since nowadays v19 is frozen, it seems to me this PR won't be backported to v19 anyway.

Also, because of the 1.9.4.x->main rebase we had a few months ago, I think I broke (my fault) this PR (because of the conflict) and I cannot bring it back to full functioning.

Also, this PR has a branch in our main repo, which shouldn't be there.

So, all I all I think we should close it.
@kiatng @elidrissidev @Flyingmana @ADDISON74 what do you think?

@github-actions
Copy link

Test Results

7 tests   7 ✔️  0s ⏱️
3 suites  0 💤
1 files    0

Results for commit cac07b5.

@kiatng
Copy link
Collaborator

kiatng commented Sep 19, 2023

When I tested it some months back, I actually prefer this PR over my old one. However, I need to retest it again to be sure.

@fballiano
Copy link
Contributor

fballiano commented Sep 19, 2023

@kiatng the author said this: #2940 (comment)

@kiatng
Copy link
Collaborator

kiatng commented Sep 20, 2023

But since nowadays v19 is frozen, it seems to me this PR won't be backported to v19 anyway.

This PR add a new method formatTimezoneDate() to avoid BC, but v19 is frozen, so I agree that this PR can be closed.

@sreichel
Copy link
Contributor Author

sreichel commented Oct 8, 2023

and I cannot bring it back to full functioning.

Pls see #2854

@sreichel
Copy link
Contributor Author

Closed as suggested. Thanks f...

@sreichel sreichel closed this Oct 19, 2023
@fballiano fballiano deleted the replace-1525 branch February 6, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants