@ljxdm: The best long-term solution here is for you to update your code, even if it is a considerable amount. ACF’s solution will be maintained in the foreseeable future and there might be more plugins and other code that will rely on it. You become very vulnerable if you continue to rely on Per’s plugin. As all the functionality now is implemented in ACF, I doubt it will be very well maintained in the future (feel free to correct me here, Per).
Of course, I have no idea how much work it would be for you to update your code, but even with a lot of queries, fixing it might be quick. Not fixing your code, will only bring you into technical debt.
For selects it might be to just wrap the instances of meta_key
with UNIX_TIMESTAMP()
e.g. SELECT * FROM wp_postmeta WHERE UNIX_TIMESTAMP(meta_key
) < 1472083200 AND […]or
SELECT meta_id, UNIX_TIMESTAMP(meta_value
) as meta_value FROM wp_postmeta WHERE […]`
For writes you’ll use DATE_FORMAT() , like UPDATE wp_postmeta SET meta_value = DATE_FORMAT("%Y-%m-%d %H-%i-%s", 1472083200)
(Also please note that the date/time format ACF saves in the DB changed in version 5.3.9, when time was added).