Is it possible to change a date of a post ?

OSSN USER Posted in General Discussion 6 years ago

Hi,

Is it possible to change the date of a post manually ? (i think the dates are managed by a field "time_created" with an incomprehensible number sequence in the database. The number of this field has a meaning ?)

Thanks a lot

Replies
Dutch OSSN USER Replied 6 years ago

I found a script to convert a date/time in a timestamp.
I tested it, it works. I can change a date / time of a post
If someone is interested the script is the following one (it is an example of course you need to change the date and the time you want)

<?php 
$date = "01 January 2018 00 hours 00 minutes";
$date = strtotime("$date");
echo $date;
?>

When this script is executed, you obtain the timestamp of the 1st of january 2018 at midnight .

Thanks Malik

pk Malik Umer Farooq Replied 6 years ago

> Is it possible to change the date of a post manually ?

Yes possible by using phpmyadmin
in your database there are maybe hundred of post how you know oh yah i want change time of this post?

> ncomprehensible number , The number of this field has a meaning ?

The number is Unix timestamp getting by using php build in function time()

if you create a file in your localserver and run these code

<?php 
        echo time();
?>

its show you like 1519556696 but you can your php logic and convert to readable form like hours ago etc