Jump to:

17478 Posts in 4473 Topics by 1972 members

Archive

SilverStripe Forums » Archive » Dates showing as 1969! Please help!

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

Page: 1 2
Go to End
Author Topic: Dates showing as 1969! Please help! 2748 Views
  • spark
    avatar
    Community Member
    15 posts

    Dates showing as 1969! Please help! Link to this post

    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

  • spark
    avatar
    Community Member
    15 posts

    Re: Dates showing as 1969! Please help! Link to this post

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

  • Fuzz10
    avatar
    Community Member
    767 posts

    Re: Dates showing as 1969! Please help! Link to this post

    What value is stored in the database ?

  • Garrett
    avatar
    Community Member
    156 posts

    Re: Dates showing as 1969! Please help! Link to this post

    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

  • spark
    avatar
    Community Member
    15 posts

    Re: Dates showing as 1969! Please help! Link to this post

    This is still unresolved.

    My database shows NULL and 00/00/0000.

    Danielle

  • Fuzz10
    avatar
    Community Member
    767 posts

    Re: Dates showing as 1969! Please help! Link to this post

    Weird.

    Could you post the code ?

  • Phalkunz
    avatar
    68 posts

    Re: Dates showing as 1969! Please help! Link to this post

    Hi Spark,

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

  • spark
    avatar
    Community Member
    15 posts

    Re: Dates showing as 1969! Please help! Link to this post

    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

    2748 Views
Page: 1 2
Go to Top

Currently Online: kPodo

Welcome to our latest member: SideOne

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.