General

Profile

werelnon (Malcolm Patterson)

  • Login: werelnon
  • Registered on: 03/14/2024
  • Last sign in: 03/14/2024

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 1 1

Activity

03/14/2024

01:08 PM Ruby Bug #20334: Time.to_i truncates a fractional timestamp instead of rounding up
Bit vague to say in the docs that `to_i` and `to_f` "may return a value that rounds or truncates". Why not just say it truncates? Regardless, I can live with it :) werelnon (Malcolm Patterson)
12:26 AM Ruby Bug #20334 (Feedback): Time.to_i truncates a fractional timestamp instead of rounding up
Simple steps that can be executed in a ruby interactive shell
```
irb(main):007> t = Time.now
=> 2024-03-14 00:23:55.983885525 +0000
irb(main):008> t.to_f
=> 1710375835.9838855
irb(main):009> t.to_i
=> 1710375835
```
Based o...
werelnon (Malcolm Patterson)

Also available in: Atom