Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- human_time_diff( get_the_time('U'), current_time( 'timestamp' ) ) . ' ago';
- date_default_timezone_set('Australia/Melbourne'); // set the time zone
- $timestamp = strtotime( $post->post_date ); // get timestamp
- $now = time();// get the curren time
- $time_passed = $timestamp - $now; // get the differnece
- // display time
- $min = $time_passed / 60;
- if( $min < 60 ) {
- return sprintf( avantgardia__( '%s min. ago', 'newspeak' ), intval( $min) );
- }
Add Comment
Please, Sign In to add comment