Convert to/from DateTime and Time in Ruby

后端 未结 6 1473
挽巷
挽巷 2020-11-29 16:44

How do you convert between a DateTime and a Time object in Ruby?

6条回答
  •  感情败类
    2020-11-29 16:58

    While making such conversions one should take into consideration the behavior of timezones while converting from one object to the other. I found some good notes and examples in this stackoverflow post.

提交回复
热议问题