System Function convertToUserTimezone()

function convertToUserTimezone(
$time, $specificTimeZone = false
)

Name in Zenario 8

ze\user::convertToUsersTimeZone()

Summary

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

Where You Can Use It

From Zenario 7.3 onwards.

Description

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.