Date.tomorrow referencing two days from now

后端 未结 2 988
盖世英雄少女心
盖世英雄少女心 2021-01-21 02:28

I\'m seeing something very odd.

<%= (Date.today).strftime(\"%A, %B %d, %Y\") %>

is resulting in Wednesday, Octobe

2条回答
  •  自闭症患者
    2021-01-21 03:21

    The method tomorrow isn't in Ruby - only in Rails. Maybe your Ruby and your Rails are set for different timezones. What do you get from Date.current, which is basically today in rails?

提交回复
热议问题