ruby - Why does Time.now.today? return false in my Rails 4 application? -


it 8:04pm in eastern standard time zone (us) on february 5, 2016.

when run command

time.now.today? #=> false 

it returns false.

why, , how can correct it? thanks.

details:

  • rails 4.0.0
  • ruby 2.2.1p85
  • mac os x el capitan

perhaps rails app configured (in config/application.rb or config/environments/*.rb) with

config.time_zone = 'utc' 

and mac in est, or conceivably vice versa. setting time zone of rails 4.1 app have handy 'utc' reproduces problem me.

if so, discrepancy happened because, @ time ran command, date day later in utc in time zone.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -