Skip to content

[superseded] undeprecate toSeconds, toUnix is not a drop-in replacement #12441

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

Closed

Conversation

timotheecour
Copy link
Member

toUnix is not a drop-in replacement for the deprecated toSeconds; if user wants subsecond resolution with a easy to use data representation via a simple float (like in python: time.time()), toSeconds is still useful (and makes it easy to inter-operate with python timestamps for example)

@GULPF
Copy link
Member

GULPF commented Oct 17, 2019

-1 from me. Just because something doesn't have a drop-in replacement doesn't mean that it cannot be deprecated. float does not belong in a time library in my opinion.

If we really want to bring this back we should at least name is something better. toSeconds only says what the unit of the return value is, it says nothing about what it represents. It's even more confusing now that we have times.inSeconds that does something completely different. Something like toUnixFloat would make more sense.

@narimiran
Copy link
Member

I agree with @GULPF here, and I don't see a reason for de-deprecation. If I'm wrong and there is a good reason or if there should be a discussion about it, please open an issue in RFCs repo.

@narimiran narimiran closed this Oct 24, 2019
@timotheecour timotheecour changed the title undeprecate toSeconds, toUnix is not a drop-in replacement [superseded] undeprecate toSeconds, toUnix is not a drop-in replacement Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants