I have following ruby code to get current time in "milliseconds", for example: 1648059542287 which is equivalent to Wed Mar 23 2022 18:19:02
What I need is timestamp rounded to nearest 30 seconds, for above example, I need it rounded to 1648059540000. Any suggestions?
@ctime = Time.now.to_f
(@ctime * 1000).to_i