I have wordpress website where I am creating events with time to it. I can access it using following in my php function file.
$start_date = DateTime::createFromFormat( AGENDA_SESSION_DATE_RETURN_FORMAT, $session['start_date'] );
$start_date = strtoupper( $start_date->format( 'g:i a' ) );
$end_date = DateTime::createFromFormat( AGENDA_SESSION_DATE_RETURN_FORMAT, $session['end_date'] );
$end_date = strtoupper( $end_date->format( 'g:i a' ) );
It uses server time and I want to convert it into Visitor local time + PST time.
I have following server time stored into database.
I want to convert it into following.
I don't want make it using visitor's IP address.
Instead I want to use visitor's OS Time which can be accessed using into JavaScript.
I can pass PHP date into JavaScript. Is there any way to do this ?
Requirement: display the times in the user's timezone instead of the server's timezone. Anyone can help me into this ?? Thanks