mirror of
https://github.com/antonioribeiro/google2fa.git
synced 2026-04-26 00:25:52 +03:00
[GH-ISSUE #51] Return type of getTimestamp() #23
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/google2fa#23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SebastianS90 on GitHub (Oct 17, 2016).
Original GitHub issue: https://github.com/antonioribeiro/google2fa/issues/51
The return type of
getTimestampis specified to beint.But the value returned is the result from floor, and that is
float(see documentation).You even test that the value is a float.
Can we make that consistent, please?
intintingetTimestampis_intfloat@returnannotation in interface and classI can do a pull request for either choice if you tell me which way to go. In my opinion,
intis better here because the value is floored anyways and even a 32 bit signed integer for a unix timestamp divided by 30 will be enough for almost another 2000 years - and by that time everyone should have switched to a system aware of 64 bit integers 😄@aik099 commented on GitHub (Oct 17, 2016):
👍 for adding
(int)before returning value. Thanks to dynamic casting in PHP this was never a problem.@antonioribeiro commented on GitHub (Jun 17, 2017):
Moved it all to (int).
Thank you!