Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Error date!!!
1 2
Chris
Posted on 11 Aug 2009, 09:36:51

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

I took a look at your hosts hosting plans, it mentions they use both PHP 4 & 5.

Can you create a new file on your server, call it phpinfo.php, and inside it put this code

Code:
<?php
phpinfo
();
?>


Then run it from your browser, it should tell you which version you're currently using.
#722
Last edited by Chris at 2009-08-11 09:47:01 Reason:
Fiendofdesign
Posted on 10 Feb 2010, 21:31:53

Access: Member
Total Posts: 5
Joined: 2010-01-13

All my dates show up as feb 28 10
When i toggle the date in the admin news posting it shows correctly.
I tried changing the date in the system according to my servers date. All it did was change the year to 70.

My PHP version is 5.1.6
#1842
Last edited by Fiendofdesign at 2010-02-10 21:36:42 Reason:
Chris
Posted on 11 Feb 2010, 00:53:19

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

When you are adding a new post, if you select "Toggle date" at the bottom, is the date set to feb 28 10 there or is it today's date?, if you change that date then post the news article is the date still set to feb 28 10?
#1843
Fiendofdesign
Posted on 11 Feb 2010, 17:00:38

Access: Member
Total Posts: 5
Joined: 2010-01-13

When I Toggle the date, it shows todays date. When I post the news it still shows feb 28 2010.
#1847
Chris
Posted on 11 Feb 2010, 19:29:15

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

I made a small change to the add and edit news modules. Download both these files

http://svn.network-13.com/dl.php?repname=N-13+news&path=%2F34%2Fnews%2Fmodules%2Faddnews.php&rev=43&peg=43&

http://svn.network-13.com/dl.php?repname=N-13+news&path=%2F34%2Fnews%2Fmodules%2Feditnews.php&rev=43&peg=43&

replace your own copies of modules/addnews.php & modules/editnews.php with these new files then try posting a new article to see if it gets given the correct date.
#1848
Fiendofdesign
Posted on 11 Feb 2010, 21:21:33

Access: Member
Total Posts: 5
Joined: 2010-01-13

I have updated the files, but still no change.
#1849
Chris
Posted on 11 Feb 2010, 21:25:03

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Only way I can think to correct this would mean disabling the ability to alter the date on news posts, but it would mean that the news is posted with the correct time.

If you edit modules/addnews.php, the one you just downloaded, on line 58~ you'll see this

Code:
$timestamp = strtotime($_POST['year'] . "-" . $months[$postmonth] . "-" . $_POST['day'] . " " . $_POST['hour'] . ":" . $_POST['minute'] . ":" . $_POST['second']);


Change that to

Code:
$timestamp = time();


Then edit modules/editnews.php, line 119, change

Code:
$timestamp = strtotime($_POST['year'] . "-" . $months[$postmonth] . "-" . $_POST['day'] . " " . $_POST['hour'] . ":" . $_POST['minute'] . ":" . $_POST['second']);


to

Code:
$timestamp = time();
#1850
1 2
Network-13.com © 2013