<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>komaji504</author_name>
  <author_url>https://blog.hatena.ne.jp/komaji504/</author_url>
  <blog_title>ドン・エンジニーア</blog_title>
  <blog_url>https://komaji504.hateblo.jp/</blog_url>
  <categories>
    <anon>Rails</anon>
    <anon>Ruby</anon>
  </categories>
  <description>日時を扱うクラスには DateTime と Time の二つがあり、どちらを使えば良いのかを知ることもなく過ごしてきてしまっていたのですが、ざっくりと知ることができたのでメモ。 基本的には Time ( ActiveSupport::TimeWithZone ) を使う Rails 環境においては、特に理由がないときは Time クラスを使うと良いそうです。 正確に言うと、ActiveSupport::TimeWithZone クラスです。 現在時刻を取得する場合で言うと、DateTime.now ではなく、 Time.now でもなく Time.current を用いるのが良いです。 Tim…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkomaji504.hateblo.jp%2Fentry%2F2016%2F05%2F03%2F020102&quot; title=&quot;Rails の Time と DateTime - ドン・エンジニーア&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-05-03 02:01:02</published>
  <title>Rails の Time と DateTime</title>
  <type>rich</type>
  <url>https://komaji504.hateblo.jp/entry/2016/05/03/020102</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
