<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mtb_beta</author_name>
  <author_url>https://blog.hatena.ne.jp/mtb_beta/</author_url>
  <blog_title>matobaの備忘録</blog_title>
  <blog_url>https://blog.mtb-production.info/</blog_url>
  <categories>
    <anon>Django</anon>
    <anon>調べてみた</anon>
  </categories>
  <description>Djangoのtimezone.nowを使っていてモヤモヤした。特に、「なぜ、UTCの時刻を返すのか」と思ったので、調べてみた。 その記録。 背景 Djangoにはtimezoneのutilsがあり、nowという関数を持っている。 これを実行すると次のようになる。 &gt;&gt;&gt; from django.utils import timezone &gt;&gt;&gt; timezone.now() datetime.datetime(2024, 3, 27, 20, 49, 31, 114299, tzinfo=datetime.timezone.utc) また、Djangoプロジェクトにはsettingsでタイム…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.mtb-production.info%2Fentry%2F2024%2F03%2F28%2F080000&quot; title=&quot;Djangoのtimezone.nowに関するモヤモヤを調べる - matobaの備忘録&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>2024-03-28 08:00:00</published>
  <title>Djangoのtimezone.nowに関するモヤモヤを調べる</title>
  <type>rich</type>
  <url>https://blog.mtb-production.info/entry/2024/03/28/080000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
