HTML Logo by World Wide Web Consortium ( Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.

[Community Tutorial] News article date manipulation

Login / Search

 [ Join | More ]
 Add topic 
#49649 (In Topic #10824)

Community saint

Goal: Change the displayed news article date

Summary: From time to time, like converting to OCP from another CMS or bulk insertion of older articles, it's desirable to want to retain the original dates on articles instead of the automatic changing to the current date and time.

  • View an article in OCP frontend and from the address bar, note the id number.
  • Open your phpMyAdmin and browse the table ocp4_news.
  • Edit the desired record (selecting by ID from step #1).
  • In the UNIX timestamp conversion tool, enter your desired date and convert.
  • Paste the results into date_and_time from step #3
  • Save
  • If your articles disappear from view after changing the date stamp, be sure your block call "history" parameter does not place the article outside of the desired date window.
  • Be sure to use a conversion tool that supports timezone or you may find your dates out by a bit or a full day.
Feature Requests ;) :
  • Published/Posted date manipulation
  • Auto expire of articles after a certain date (akin to history, but more granular)

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top

Community saint

SoccerDad said

UNIX timestamp conversion tool (
Thanks, SD.

All good info, but the link quoted above is a real cracker!


Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: