Timezone for Plugin

I'm using these two lines:

$expires = strtotime( $_POST['expire_date']);
if($expires  time())

to test the time in the name=expire_date form against GMT time. But no matter what I do my expire date time is 5 hours off. I'm in GMT -5, so I'm trying to adjust the top line:

$expires = strtotime( $_POST['expire_date']) - (( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ));

But it's not working. Any ideas for correct GMT offset handling in Wordpress?

Topic date offsets timestamp timezones date-time Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.