Unix Timestamp in DB
-
Hello,
I am using one membership plugin and it stores the expiry date in usermeta table with a custom meta key, the meta value is stored in epoch format like “1630627200”
This is why I can not filter this date with its real value which is: 23-09-2021 or 2021-09-12
If I filter with 1630627200 then it works, I have checked this Git hook: https://github.com/codepress/admin-columns-hooks/blob/master/snippets/custom-field-unix-dates.php
I tried change
$value = strtotime( $value );
with
$value = date(‘Ymd’, $value); // also tried Y-m-dIn the function that is hooked with acp/editing/save_value
Am I missing something?
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Unix Timestamp in DB’ is closed to new replies.