How to change a date ?

OSSN USER Posted in General Discussion 7 years ago

Hi,

I would like to know if it is possible to change a date of post on the wall of the network.
I guess it is by the field time_created in the database .
How to define it ?
Thanks

Replies
Dutch OSSN USER Replied 7 years ago

Thanks Arsalan Shah but this change modify the format of time of the post, i would like to know if i can "cheat" by changing completely the date of the post (if i forget a birthday for example) like we can edit a post to change what members wrote.

For example, a friend has his birthday the 8 of september. I forgot it, i post a message of wish the 10 of september. Can i change the 10 of september by the 8 of september ?

Thx

Indonesian Arsalan Shah Replied 7 years ago

You should take a look at : https://github.com/opensource-socialnetwork/opensource-socialnetwork/blob/v4.x/components/OssnWall/plugins/default/wall/templates/wall/user/item.php#L50

You can change <?php echo ossn_user_friendly_time($params["post"]->time_created); ?> to <?php echo date("d/m/y", $params["post"]->time_created); ?> or in the way you wanted.