I’m at present utilizing WordPress, and a component of user_registered returns the time of registration of the consumer.
I’ve set the right timezone, however do not know methods to get the user_registered output to match my present time.
To date, that is what I’ve.
date_default_timezone_set('America/Los_Angeles');
$customers = get_users();
foreach( $customers as $consumer ) {
$udata = get_userdata( $user->ID );
$registered = $udata->user_registered;
printf( '%s member since %s<br>', $udata->data->display_name, date( "Y-m-d H:i:s", strtotime( $registered ) ) );
}
echo('date under <br>');
echo date('Y-m-d H:i:s');
The date default timezone certainly adjustments the timezone (final echo)
Nevertheless, what I need to change is the output of user_registered. (which is the saved time).
How do I globally change the best way the time is being displayed when referred to as? In different phrases if I name for the date/timestamp via plugin or direct, it can all the time give me the output of America/Los_Angeles.
Thanks prematurely. I am a noob. FYI the echo and printf stuff is solely for momentary show. I need to change the best way user_registered is rendered when referred to as from plugin or direct.
If javascript or jquery is an choice i am all ears.