I'm developping a website (PHP/MySQL based) which shows posts and where people can only see certain types of posts once their "releasing" date is reached and not before, for example.
So far I've been using:
$released_date = date("Y-m-d H:i:s");
in my script to save any date in my db as a datetimeNOW() > released_date
in my mysql request to retrieve specific poststime() > strtotime($data['released_date'])
in my php script to display or hide specific features within posts
But I'm realizing that these might not be compatible together (at least, the last one vs the first 2) and some time zone issues seem to occur. How can I make these three compatible somehow?
I need my website to "work the same way" independantly from where the user sits, anywhere in the world. Meaning that, if a post's date has reached a specific value, then everybody can see it and use certain features in it.
What would be the best strategy for this? Synchronize everything with the unix timestamp? with my server time value?
I really got lost here...
Any help and/or advices are greatly appreciated! Thank you in advance!
Lois