picarica Posted April 8 Share Posted April 8 so i am getting date from external DB like so $page_created = strtotime($row['date_create']); output echo of this is echo "Datum vytvorenia: " . $page_created. "<br>"; Datum vytvorenia: 1440074105 but when i save the page $p = new Page(); $p->setOutputFormatting(false); $p->template = 'clanok'; $p->parent = wire('pages')->get('/clanky/'); $p->name = $page_slug; $p->title = $page_title; $p->created = $page_created; $p->modified = $page_modified; $p->clanok = $page_body; $p->tags = $page_category_name; $p->autor = $page_author; $p->pocet_klikov = $page_popularity; $p->save(); $p->obrazok->add($page_image_path); $img = $p->obrazok->first(); $img->description = $page_image_description; $p->save(); but when i take a look at the page in PW its still created and modified 5 seconds ago, never my date supplies, how is it possible ? Link to comment Share on other sites More sharing options...
bernhard Posted April 8 Share Posted April 8 Please have a look at this thread. As far as I know this is still valid: 3 Link to comment Share on other sites More sharing options...
picarica Posted April 8 Author Share Posted April 8 that seemed to work great ! thank you Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now