スキップしてメイン コンテンツに移動

sitemap.xml の lastmod で日付のエラーがでた。ファイルのタイムスタンプにも注意!

sitemap.xmlに記載しているlastmodに「日付の値が無効です。 日付または書式設定を修正してから、再送信してください。」というエラーが出ていた。

lastmodはファイルの更新日を標記するタグ

フォーマットはW3C Datetime形式で記述する必要があるそうだ。省略してYYYY-MM-DDでも標記できるとある。

W3Cではこう書いてある。

Formats

Different standards may need different levels of granularity in the date and time, so this profile defines six levels. Standards that reference this profile should specify one or more of these granularities. If a given standard allows more than one granularity, it should specify the meaning of the dates and times with reduced precision, for example, the result of comparing two dates with different precisions.
The formats are as follows. Exactly the components shown here must be present, with exactly this punctuation. Note that the "T" appears literally in the string, to indicate the beginning of the time element, as specified in ISO 8601.
   Year:
      YYYY (eg 1997)
   Year and month:
      YYYY-MM (eg 1997-07)
   Complete date:
      YYYY-MM-DD (eg 1997-07-16)
   Complete date plus hours and minutes:
      YYYY-MM-DDThh:mmTZD (eg 1997-07-16T19:20+01:00)
   Complete date plus hours, minutes and seconds:
      YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
   Complete date plus hours, minutes, seconds and a decimal fraction of a
second
      YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)
where:
     YYYY = four-digit year
     MM   = two-digit month (01=January, etc.)
     DD   = two-digit day of month (01 through 31)
     hh   = two digits of hour (00 through 23) (am/pm NOT allowed)
     mm   = two digits of minute (00 through 59)
     ss   = two digits of second (00 through 59)
     s    = one or more digits representing a decimal fraction of a second
     TZD  = time zone designator (Z or +hh:mm or -hh:mm)
This profile does not specify how many digits may be used to represent the decimal fraction of a second. An adopting standard that permits fractions of a second must specify both the minimum number of digits (a number greater than or equal to one) and the maximum number of digits (the maximum may be stated to be "unlimited").
This profile defines two ways of handling time zone offsets:
  1. Times are expressed in UTC (Coordinated Universal Time), with a special UTC designator ("Z").
  2. Times are expressed in local time, together with a time zone offset in hours and minutes. A time zone offset of "+hh:mm" indicates that the date/time uses a local time zone which is "hh" hours and "mm" minutes ahead of UTC. A time zone offset of "-hh:mm" indicates that the date/time uses a local time zone which is "hh" hours and "mm" minutes behind UTC.
A standard referencing this profile should permit one or both of these ways of handling time zone offsets.

Examples

1994-11-05T08:15:30-05:00 corresponds to November 5, 1994, 8:15:30 am, US Eastern Standard Time.
1994-11-05T13:15:30Z corresponds to the same instant.
 間違っていないのになんでエラーなんだろうか?
もしかしたら、サーバーが返す、「If-Modified-Sinceヘッダ」が違う日付を返しているのだろうか?
など、いろいろ考えてみましたが、sitemap.xmlのタイムスタンプを更新したら解決しました。

コメント

このブログの人気の投稿

Excelのショートカット技 Altを制するものがExcelを制する!

仰々しいタイトルを書いてしまいましたが、エクセルの生産性を高めるのにショートカットは非常に有効です。 1,000行を超えるデータを扱うときに、 ”Ctrl + ↓(カーソルキー)" を使わずにマウスのホイールをクリクリしていたら腱鞘炎になってしまいます。 エクセルのショートカットは非常に複数ありますので、自分がよく使う機能だけ覚えるのが得策です。 1.ショートカットのヒントを表示させる ショートカットはわざわざネットで調べるまでも無く、エクセル上でヒントが表示されます。 そのヒントを表示させるのが「Alt」なのです。 膳は急げ、まずはエクセルを起動して「Alt」を押します。 そうすると、リボンの上にアルファベットでが表示されます。これはショートカットのキーアサインになっていて、指示されたキーを押すとをアクティブなリボンが移動します。 ためしに、数式タブ(リボン)に移動するために「M」キーを押すと、下記のように移動してリボン内のメニューにショートカットキーアサインが表示されます。 ここでは、「参照元のトレース」を選択するため、「P」を押します。 そうすると選択したセルの「参照元のトレース」が実行されました 2.よく使うショートカットを覚える このように、「Alt」キーを押してヒントを表示させることで、自分がよく使う機能のショートカットがわかるわけです。 これであれば、便利そうだけど自分の作業では使わないショートカットを覚えずにすみます。 いくつか私がよく使うショートカットを下記にサンプルとして書きます。 セルを結合して中央揃え Alt + H + M + M 桁区切りスタイル(3桁ごとに”,”カンマを打つやつ) Alt + H + K 参照元のトレース Alt + M + P 参照先のトレース Alt + M + D トレース矢印の削除 Alt + M + A + A

Mac OS X エラーコード 8076

MacOS X 10.9で、ファイルの名称変更を行ったところ、エラーコード8076が表示され、変更ができない事象が発生しました。 どうやら、別プロセスで大容量のファイルをファイルサーバーにコピーしていたのが、影響したようで、このコピーが完了したら、無事ファイル名が変更できる様になりました。

うわさの公式

社会心理学者のG.W.オルポート、L.ポストマンがその著作 「デマの心理学」で語ったのが、「噂の公式」なる数式。 岩波書店から日本語訳で出版されたのが1952年であり かなり古いものになりますが、改めて見ると興味深いものです。 ● 噂の公式: R=i×a R : Rumor (噂の流通量) i : importance (その情報の重要性) a : ambiguity (その情報の曖昧さ) 噂がどの規模まで流通(伝達)されるかは、 伝達者にとっての、その情報の重要性と、 情報内容の曖昧さの「積」によって決定されるというもの。