Displaying current date to user according to their time zone

megabosx

Active member
#1
I want to display the current date to the user in their time zone and be able to format it appropriately, i found the following recommendation by the community but it doesn't seem to work in the context of a sidebar. Any idea what might be wrong?
PHP:
{xen:date $serverTime, 'm/d/Y'}
 

xenfans

Well-known member
#4
I meant it more as an example as to how they've used the XenForo_Locale::time(), how to get the timezone of the user, .. just repurpose it to a date (the Model/User.php file)
 
Last edited:
Top