Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Dates showing as 1969! Please help!


Go to End
Reply

10 Posts   3805 Views

Avatar
spark

7 September 2008 at 6:11am Community Member, 15 Posts

HEY THERE!

I used SilverStripe to build a site for a client... www.parkhillscc.com

The Events pages are showing the dates as 12/31/1969 - this is quite odd to me. Can some one please assist me here? I have an irritated client and I have tried the steps in a few other posts here about this problem w/ no success. Any help is greatly appreciated.

Danielle

Avatar
spark

11 September 2008 at 2:38am Community Member, 15 Posts

Any one available to assist? I could really use some help! Thanks in advance.

Avatar
Fuzz10

11 September 2008 at 7:36pm Community Member, 787 Posts

What value is stored in the database ?

Avatar
Garrett

12 September 2008 at 3:36am Community Member, 245 Posts

Hi--

Did you ever get this solved? I'm having the same issue in the Blog module. No matter what date my blog posts have in the DB, the Archive links say "December 1969".

Any ideas??

//Garrett

Avatar
spark

12 September 2008 at 5:56am Community Member, 15 Posts

This is still unresolved.

My database shows NULL and 00/00/0000.

Danielle

Avatar
Fuzz10

12 September 2008 at 6:26am Community Member, 787 Posts

Weird.

Could you post the code ?

Avatar
Phalkunz

12 September 2008 at 12:03pm 69 Posts

Hi Spark,

Most likely, you date field points to wrong database field.

Avatar
spark

9 October 2008 at 2:08pm Community Member, 15 Posts

Here is my ArticlePage.php code:

<?php
/**
* Defines the ArticlePage page type
*/
class ArticlePage extends Page {
static $db = array(
'Date' => 'Date',
'Author' => 'Text'
);
static $has_one = array(
);

function getCMSFields() {
$fields = parent::getCMSFields();

$fields->addFieldToTab('Root.Content.Main', new CalendarDateField('Date', 'Date'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Author'), 'Content');
   
return $fields;

}
}

class ArticlePage_Controller extends Page_Controller {

}

?>

But when anything is posted, it changes the date to 00/00/0000 both in the CMS and in the database. This is a major problem. Can anyone please help??

Danielle

Go to Top