WordPress Dapatkan Tanggal Lokal

<?php
/**
 * This code just work for wordpress only.
 * use date('G'); for php code
 */
  
echo current_time('mysql'); // return mysql datetime 'Y-m-d H:i:s'
echo current_time('timestamp'); // using timestamp
Dev Indonesia