Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Uid] Fix time to float conversion#40003

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@fancyweb
Copy link
Contributor

@fancywebfancyweb commentedJan 27, 2021
edited by nicolas-grekas
Loading

QA
Branch?5.2
Bug fix?yes
New feature?no
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

On 32b systems, when the timestamp is before the UNIX epoch, the result is currently shifted by 1. Inverting all the bits is not enough, we need to add 1. I guesshttps://en.wikipedia.org/wiki/Two%27s_complement is relevant here?

Alternative:

$time = -1 *self::toBase(self::add($time ^"\xff\xff\xff\xff\xff\xff\xff\xff","\x00\x00\x00\x00\x00\x00\x00\x01"),self::BASE10);

@carsonbot
Copy link

Hey!

I appreciate you submitting this PR.

But you have made this PR towards a branch that is not maintained anymore. :/
Could you update thePR base branch to target one of these branches instead? 4.4, 5.2.

Cheers!

Carsonbot

@nicolas-grekasnicolas-grekas added this to the5.2 milestoneJan 27, 2021
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

(for 5.2, 5.1 is EOLed now)

@fancywebfancyweb changed the base branch from5.1 to5.2January 27, 2021 17:12
@fancywebfancywebforce-pushed theuid/fix-32b-time-to-float branch fromf90978a to9680a27CompareJanuary 27, 2021 17:12
@nicolas-grekas
Copy link
Member

Thank you@fancyweb.

@nicolas-grekasnicolas-grekas merged commit6a935bb intosymfony:5.2Jan 27, 2021
@fancywebfancyweb deleted the uid/fix-32b-time-to-float branchJanuary 27, 2021 18:14
@fabpotfabpot mentioned this pull requestFeb 3, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.2

Development

Successfully merging this pull request may close these issues.

3 participants

@fancyweb@carsonbot@nicolas-grekas

[8]ページ先頭

©2009-2025 Movatter.jp