-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[RFC] Bring back Time.now #9275
Comments
For reference, previous discussions in: #5346, #7586 This proposal would be in line with #7586 (comment) f. |
If I ask time to someone not in my country, it will respond by precising the timezone. |
I also prefer reading |
That was exactly the reason for renaming Thus, adding @asterite You're only referring to methods without arguments, so I take you only mean to add the |
Well, nevermind. |
Every time (no pun intended) I want to get the current time I write
Time.now
. Then after getting an error I remember we changed it toTime.local
.I think
Time.now
is good: when you walk down the street and ask someone "what time is it now?" and they say "3 pm", I would be surprised if that means "3 pm UTC" or any other thing than the current local time.In Go it's called
time.Now()
. In Python it's calleddatetime.datetime.now()
. In Ruby it'sTime.now
. In Nim it's callednow()
.Could we bring it back? We can keep it as an alias of
local
in cases where one would thinklocal
is a bit more explicit, specially when using bothlocal
andutc
to make it more obvious. I know we are against aliases, but this is just a tiny one. Otherwise we can removelocal
, but I don't see a need for that.The text was updated successfully, but these errors were encountered: