Comments on: Edge Rails: Time#current /2010/07/05/edge-rails-timecurrent/ Its all about Ruby On Rails Thu, 14 Mar 2013 06:19:42 +0000 hourly 1 #/?v= By: hubert /2010/07/05/edge-rails-timecurrent/comment-page-1/#comment-6589 hubert Sat, 20 Nov 2010 18:49:52 +0000 /?p=415#comment-6589 a more concise way to do this is Date.current a more concise way to do this is Date.current

]]>
By: Tweets that mention Edge Rails: Time#current | WebOnRails -- Topsy.com /2010/07/05/edge-rails-timecurrent/comment-page-1/#comment-2087 Tweets that mention Edge Rails: Time#current | WebOnRails -- Topsy.com Tue, 06 Jul 2010 06:31:57 +0000 /?p=415#comment-2087 [...] This post was mentioned on Twitter by Akhil Bansal, Rails Bot. Rails Bot said: Edge Rails: Time#current http://bit.ly/bIoEfi [...] [...] This post was mentioned on Twitter by Akhil Bansal, Rails Bot. Rails Bot said: Edge Rails: Time#current http://bit.ly/bIoEfi [...]

]]>
By: taelor /2010/07/05/edge-rails-timecurrent/comment-page-1/#comment-2064 taelor Mon, 05 Jul 2010 18:27:50 +0000 /?p=415#comment-2064 protip: If your website deals heavily with different Time Zones, you need to use Time.current.to_date instead of Date.today when automatically setting the date for some attribute. For instance, if your server is in the Eastern Time Zone, and someone is using the system at 11 PM in the Pacific time zone, you will get the wrong date. Anyone have any comments about overriding Date.today to use Time.current.to_date when config.time_zone is set? Good idea or bad idea that might get you in trouble? protip: If your website deals heavily with different Time Zones, you need to use Time.current.to_date instead of Date.today when automatically setting the date for some attribute.

For instance, if your server is in the Eastern Time Zone, and someone is using the system at 11 PM in the Pacific time zone, you will get the wrong date.

Anyone have any comments about overriding Date.today to use Time.current.to_date when config.time_zone is set? Good idea or bad idea that might get you in trouble?

]]>