{
  "path": "/3mdzkuhzpss26",
  "site": "at://did:plc:lmftezsq52hi53taz762s7pc/site.standard.publication/3lynwltmwoc2v",
  "tags": [
    "astro"
  ],
  "$type": "site.standard.document",
  "title": "markdownのdateが日本でまずい",
  "content": {
    "$type": "pub.leaflet.content",
    "pages": [
      {
        "id": "019c27ea-ea7b-799e-89e0-09f47addcecd",
        "$type": "pub.leaflet.pages.linearDocument",
        "blocks": [
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [
                {
                  "index": {
                    "byteEnd": 90,
                    "byteStart": 74
                  },
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#code"
                    }
                  ]
                },
                {
                  "index": {
                    "byteEnd": 107,
                    "byteStart": 103
                  },
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#code"
                    }
                  ]
                }
              ],
              "plaintext": "自分のサイトの記事はローカルのmarkdownのfrontmatterでは 2026-01-01 12:00 のようにdateに記述していて、Astroのcontent collectionとして読み込んだ場合日付はUTCと解釈されてしまう。"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.code",
              "language": "markdown",
              "plaintext": "---\ntitle: standard.siteのテスト記事\nfeatured: /src/assets/images/note/logo/astro-cool-parts.png\ndescription: sequoiaでやってみた\ndate: 2026-02-01 15:42:00\nbaseUrl: /note/\ncategory: Astro\ntags:\n  - astro\n  - atprotocol\natUri: \"at://did:plc:lmftezsq52hi53taz762s7pc/site.standard.document/3mduknedv6c26\"\n---",
              "syntaxHighlightingTheme": "tokyo-night"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [],
              "plaintext": "Bridgy Fed導入の時にSNS側のポスト時間がおかしくなってしまうのでポスト時間に関係するpublishd-dtの部分だけなんとかしていた。"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [],
              "plaintext": "表示上はタイムゾーンを指定せず表示しているのでおかしくはないもののデータ上はおかしいしUTCではないタイムゾーンのサーバーでは表示も日時がずれてしまう。"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [
                {
                  "index": {
                    "byteEnd": 33,
                    "byteStart": 29
                  },
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#code"
                    }
                  ]
                }
              ],
              "plaintext": "そんなわけでmarkdownのdateを日本時間として受取りAstroのcontent collectionでUTCに正しく変換されるようにした。"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [],
              "plaintext": "SSGはまだまだ面倒であるしWordpressが選ばれるのもしょうがないなといったところ。"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [],
              "plaintext": "何より将来Wordpressのほうが生き残っている可能性は高いわけだし。"
            }
          }
        ]
      }
    ]
  },
  "description": "時間問題を今更修正した",
  "publishedAt": "2026-02-04T09:30:25.405Z"
}