Using the lastmod attribute

April 14, 2006

With ourrecent infrastructure changes, we've made some minor changes in how we process thelastmod attribute. If you omit the time portion, it defaults to midnight UTC (00:00:00Z). If you specify a time, but omit the timezone, you'll get an invalid date error. You'll also get an invalid date error if you specify an invalid date or time (like February 80th) or the date isn't in the correct format. You'll no longer see errors associated with future dates.

Dates must useW3C Datetime encoding, although you can omit the time portion. For instance, the following are both valid:

  • 2005-02-21
  • 2005-02-21T18:00:15+00:00

Posted byVanessa Fox

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.