Advertisement
rAthus

[WP] [PHP] force ACF to take timezone into account when returning date and datetime values

Jan 26th, 2023 (edited)
665
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.21 KB | None | 0 0
  1. <?php
  2.  
  3. // force ACF to take timezone into account when returning date and datetime values
  4. add_filter('date_i18n', function ($date, $format, $timestamp, $gmt) {
  5.     return wp_date($format, $timestamp);
  6. }, 99, 4);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement