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

Time.to_i is always UTC #47

Open
ababich opened this issue Nov 17, 2016 · 0 comments
Open

Time.to_i is always UTC #47

ababich opened this issue Nov 17, 2016 · 0 comments

Comments

@ababich
Copy link

ababich commented Nov 17, 2016

timestamps are naturally from EPOCH which is time zone independent
https://en.wikipedia.org/wiki/Unix_time

So that Time.now.to_i == Time.now.utc.to_i is ALWAYS true
and, obviously, .utc conversion makes no sense in
https://github.com/cyx/ohm-contrib/blob/master/lib/ohm/timestamps.rb#L27-L28

But, this may be caused from some legacy ruby lang versions, please correct me if this is the case

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

No branches or pull requests

1 participant