title: Rails DateTime object isn't what I expect
body: <p>I'm a Java developer who is very new to Ruby so if this question is a little too basic, please go easy on me.  :)  I'm here to learn if someone can point me in the right direction.</p>
  
  <p>I'm writing an application that deals with times and will need to take time zones into account.  I was curious what Ruby offers for dealing with timezones and I found that Rails provides a DateTime class that should do what I need.  <a href="http://api.rubyonrails.org/classes/DateTime.html#method-i-in_time_zone" rel="nofollow">http://api.rubyonrails.org/classes/DateTime.html#method-i-in_time_zone</a></p>
  
  <p>However, when I create a DateTime, it doesn't seem to have the methods I expect.  Can someone explain what is going on here?  Here is what I'm seeing in irb:</p>
  
  <pre><code>&gt;&gt; dt = DateTime.now
  NameError: uninitialized constant DateTime
      from (irb):1
  &gt;&gt; require 'rails'
  =&gt; true
  &gt;&gt; dt = DateTime.now
  =&gt; #&lt;DateTime: 212158799144191849/86400000000,-1/4,2299161&gt;
  &gt;&gt; dt.respond_to? "in_time_zone"
  =&gt; false
  </code></pre>
  
  <p>Since DateTime isn't defined until I require rails, I assumed I was using the Rails DateTime but it doesn't seem to have the methods I'm expecting based on the documentation.</p>