Date filters – past() – and timezones

This topic is: not resolved
Viewing 3 posts - 1 through 3 (of 3 total)
Author Posts
June 11, 2015 at 7:50 am #3664
TUC
Post count: 7

We are using the past() method to check if the end date of an event (MPFT_datepicker) has gone by.

We are in zone America/Vancouver – UTC-8 – and the function is returning true for anything up to 8 hours in the future.

How can we use this function and get the correct answer in our timezone?

thanks.

June 12, 2015 at 1:32 pm #3665
traversal
Post count: 207

Yes, interesting question, after looking into it, it seems the past and future methods might be a little simplistic, and need to consider the timezone offset as well. I’ll look into it further to work out what the correct code should be, and let you know when a fix is available.

January 22, 2016 at 9:43 am #3711
TUC
Post count: 7

Hi – just wondering if you’d had a chance to address this – we continue to workaround using WP_Query but proper treatment of timezones in past() and future() would help a lot. Thanks,

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Latest From the Blog

Ability to deactivate licence domains within MasterPress account management

25th October 2024

We have just rolled out an account management feature which allows licence holders to have better control over the domains that use their licence key. From the MasterPress Account Management page, the list of Active Sites that use your licence now includes a function that allows you to remove a domain from your licence. Simply… 

Plugin Requirements

MasterPress requires a minimum of WordPress version 4.9, MySQL 5.6, and PHP version 5.6.20.

We also recommend that PHP is configured to use a memory limit of 64MB per request (128MB may be required for sites with higher complexity).

This plug-in is not compatible with the WordPress.com hosted service.

Three AM