Closed gordielachance closed 5 years ago
Hi,
Wowsa that's a lot of new issues posted at the same time.
I'm going to have a look at your PR as well :)
As for this specific issue the answer is plainly no. It's not a good idea to use current_time. However if your case is that the date displayed in the UI is a bit off from your local time then that's something that can be corrected by changing the outputting function.
Here's a bit of info from WP Codex itself:
Note that if you are storing the time of an event, current_time( 'timestamp' ) should not be used in lieu of time(), as it returns a Unix timestamp that is incorrectly offset and inaccurate. Unix timestamps are always in UTC and do not have any other timezone attached. Should the site owner change the timezone of the WordPress installation at any time, stored timestamps that are offset using current_time( 'timestamp' ) will be incorrect. Instead of using current_time( 'timestamp' ), which is no longer recommended, use time() and store it unmodified.
Hi, I think that there it time issues with your plugin. Should it not better use WP function
instead of
?