Using the lastmod attribute
Stay organized with collections
Save and categorize content based on your preferences.
April 14, 2006
With our
recent infrastructure changes,
we've made some minor changes in how we process the
lastmod 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 use
W3C 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 by Vanessa Fox
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
[null,null,[],[],["Recent infrastructure changes have led to updates in processing the `lastmod` attribute. Omitting the time in `lastmod` now defaults to midnight UTC. Specifying a time without a timezone, providing an invalid date/time, or using an incorrect format will result in an error. Future dates will no longer generate errors. Dates must adhere to W3C Datetime encoding, but the time portion is optional, with examples of valid formats provided.\n"],null,[]]