ほぼ解決:ブログ投稿時間がうまくいかなかった話

bloggerのカスタマイズを半年ぶりくらいにしてるたこやき(@tamagodq10)です。

というわけでこれ

        <b:includable id='postTimestamp'>
          <span class='byline post-timestamp'>
            <data:byline.label/>
            <b:if cond='data:post.url'>
              <meta expr:content='data:post.url.canonical'/>
              <div class='write-date'>投稿日&#12288;&#65306;
                <time class='published' expr:datetime='data:post.date.iso8601' expr:title='data:post.date.iso8601'>
                  iso8601:
                  <data:post.date.iso8601/>
                  <br/>
                  data:
                  <data:post.date.year/>
                  <data:post.date.month/>
                  <data:post.date.day/>
                  ts:
                  <data:post.date.timestamp/>
                  abbr:
                  <abbr class='published' expr:title='data:post.timestampISO8601' itemprop='datePublished'><data:post.timestamp/></abbr>
                  <br/>
                  format:
                  <b:eval expr='data:post.date format &quot;yyyy-MM-dd&quot;'/>
                  <b:eval expr='data:post.date format &quot;HH:mm&quot;'/>
                  <!-- <data:post.date /> -->
                </time>
              </div>
              <b:if cond='data:post.date != data:post.lastUpdated'>
                <div class='last-updated'>最終更新&#65306;
                  <time expr:datetime='data:post.lastUpdated.iso8601'>
                    iso8601:
                    <data:post.lastUpdated.iso8601/>
                    <br/>
                    date:
                    <data:post.lastUpdated.year/>
                    <data:post.lastUpdated.month/>
                    <data:post.lastUpdated.day/>
  
                    <br/>
                    format:
                    <b:eval expr='data:post.lastUpdated format &quot;yyyy-MM-dd&quot;'/>
                    <b:eval expr='data:post.lastUpdated format &quot;HH:mm&quot;'/>
                    <!-- <data:post.lastUpdated /> -->
                  </time>
                </div>
              </b:if>
            </b:if>
          </span>
        </b:includable>




iso8601:
<data:post.date.iso8601>
2020-07-16T14:46:00+09:00
yyyy-MM-ddTHH:mm:ss+Timezone

data:
2020 7 16
yyyy M dd

format:
2020-07-16 05:46
タイムゾーンが無視される

と思ったらこれですやん
<data:post.date>
14:46:56
HH:mm:ss

上のdataと合わせておわおわり

強いて言うなら月を二桁にしたい感はある

コメント