Ruby/Rails: converting a Date to a UNIX timestamp

后端 未结 5 1893
迷失自我
迷失自我 2020-12-07 08:12

How would I get a UNIX timestamp (number of seconds since 1970 GMT) from a Date object in a Rails app?

I know Time#to_i returns a timestamp, but doing <

5条回答
提交回复
热议问题