Forums / Setup & design / published dates all in the 70's

published dates all in the 70's

Author Message

paul harvey

Sunday 08 February 2004 4:55:22 pm

all my published dates for lin view show 01/01/1970 in linux and windows. I have seen post with the same promblem but no answer. the templates are as follows: the code is pretty much ripped from other examples

full_view_news_folder.tpl
----------------------------
<form method="post"
action={"content/action/"|ezurl}>
<input class="button"
type="submit"
name="NewButton"
value="Submit News" />
<input type="hidden"
name="ClassID"
value="16" />
<input type="hidden"
name="NodeID"
value="{$node.node_id}" />
</form>
<div><p>The news on this site is moderated. So new posts will not show untill approved</p></div>

<div align="center" class="siteName"><strong>Latest news</strong></div>
<br>
{* Grab some of the content of the node that is being viewed. *}
{let children=fetch( content, list, hash( parent_node_id, $node.node_id,
sort_by,array(published,false()), $node.sort_array,
limit, 7,
class_filter_type, include,
class_filter_array, array(
'news') ) )}
{* LOOP: For each child of the node... *}
{section name=Child loop=$children}
{* Display the content of the child using a line-view template. *}
{node_view_gui view=line content_node=$Child:item}
<br>
<!-- needs a divider -->
{* End of loop. *}
{/section}
{* End of namespace. *}
{/let}
<br>
<div class="center">
<a href={"/news/archive"|ezurl}>
Click here to access the news archive...
</a>
</div>

line_view_news.tpl
-------------------

<table width="100%" cellspacing="0">
<tr>
<td align="center"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td class="bgdark"><span class="headline_link">{attribute_view_gui attribute=$node.object.data_map.title} </span></td>
<td class="bgdark"> </td>
</tr>
<tr >
<td colspan="2" valign="top" class="bglight"><span class="story">{attribute_view_gui attribute=$node.object.data_map.intro} </span><a href={$node.url_alias|ezurl}> </a></td>
</tr>
<tr >
<td class="bgdark">Published {* Display the date the article was published. *} {$:item.object.published|l10n(shortdate)} </td>
<td width="100" align="right" bgcolor="#f0f0f0"><a href={$node.url_alias|ezurl}>read more.</a></td>
</tr>
</table></td>
</tr>
</table>
<p> </p>

full_view_news.tpl
-------------------
{* Display the headline, use huge characters. *}
<div class="headline">
{attribute_view_gui attribute=$node.object.data_map.title}
</div>
{* Display the thumbnail image, right-justified. *}
<div class="imageright">
{attribute_view_gui attribute=$node.object.data_map.thumbnail}
</div>
{* Display the intro-text using bold characters. *}
{attribute_view_gui attribute=$node.object.data_map.intro}
{* Display the actual body/content of the article. *}
{attribute_view_gui attribute=$node.object.data_map.body}

if you can help it would be much appreciated.

thanks
paul

Kåre Køhler Høvik

Sunday 08 February 2004 11:40:01 pm

Are the dates you're trying to show from objects in the news package, or objects you have created your self ?
What locale settings are you using ?

--
Kåre Høvik

Kåre Høvik

paul harvey

Monday 09 February 2004 3:00:59 am

the dates are from the the news class that comes from ez and the local is gb. the dates are only worng in line view, when i use full view they are shown corectly and in the ez admin interface all dates work.

Paul

paul harvey

Monday 09 February 2004 1:12:10 pm

the answer is here if anybody needs it

http://ez.no/community/forum/developer/printing_the_modified_and_published_dates_ini_a_article_list_