-
- 126 Posts
Having problems with PHX date format.
Using the below line of code for a googe news site map. News to be a standard time format.
<news:publication_date>[+date:date=`%Y-%d-%m`+]</news:publication_date>
Its outputting the following date for all docs which is obviously incorrect
<news:publication_date>1969-31-12</news:publication_date>
Any suggestion as to where im going wrong.
-
- 24,544 Posts
[+date+] needs to be a Unix timestamp for PHX. You may need to convert it to one before using it.
-
- 24,544 Posts
Quote from: smcilreavy at Aug 15, 2009, 08:05 PM
How would I go about doing that?
It depends. Where is the value of the [+date+] placeholder set?
-
- 126 Posts
I think its standard in modx.
One of the base placeholders.
-
- 24,544 Posts
Quote from: smcilreavy at Aug 15, 2009, 08:19 PM
I think its standard in modx.
One of the base placeholders.
MODx doesn’t set any base placeholders that I’m aware of (which could explain your problem
). Some snippets do, but you might be looking for a content tag instead. What is it the date of (e.g. creation date of the current document, publication date of the current document, or what)?
-
- 126 Posts
Oh,
Maybe its a ditto place holder?
Stuart
-
- 24,544 Posts
Quote from: smcilreavy at Aug 15, 2009, 09:11 PM
Think i stumbled across the solution here
http://modxcms.com/forums/index.php/topic,38248.0.html
Right, that’s a content tag, not a placeholder.