System Function convertToUserTimezone()

function convertToUserTimezone(
$time, $specificTimeZone = false

Name in Zenario 8



Convert a date into the current extranet user's timezone.

Where You Can Use It

From Zenario 7.3 onwards.


Given a MySQL timestamp, a unix timestamp, or a PHP date object, this returns a PHP date object in the current extranet user's timezone.

If the current visitor is not logged in as an extranet user, or they have no timezone set, then this function will still return a PHP date object, but no conversion will happen.