timezone question

EQnoble

Well-known member
Is it possible for me to check and get the timezone setting of a logged in member viewing a page?

I am thinking I need to use this but not sure...

Code:
$visitor.timezone
 
That would be the one, yes. If you're curious about the specifics, you could always use this code to see what's available for the $visitor variable (or any really) in the template:
Code:
{xen:helper dump, $visitor}
The condition you want if you only want it for logged-in users would be similar to this one:
HTML:
<xen:if is="{$visitor.user_id} AND {$visitor.timezone} == 'America/New_York'">Your content/link here</xen:if>
 
That would be the one, yes. If you're curious about the specifics, you could always use this code to see what's available for the $visitor variable (or any really) in the template:
Code:
{xen:helper dump, $visitor}
The condition you want if you only want it for logged-in users would be similar to this one:
HTML:
<xen:if is="{$visitor.user_id} AND {$visitor.timezone} == 'America/New_York'">Your content/link here</xen:if>
Thanks!
Well what I am trying to do is this....in your example:


America/New_York has a UTC time of UTC-05:00 what i need to do is get the -05:00 if a user has selected that timezone. Is this possible...or will I have to make a list of all of the timezones and the appropriate adjustments to make?
 
Thanks!
Well what I am trying to do is this....in your example:


America/New_York has a UTC time of UTC-05:00 what i need to do is get the -05:00 if a user has selected that timezone. Is this possible...or will I have to make a list of all of the timezones and the appropriate adjustments to make?
For now scratch that....I figure out a workaround. Thanks for the inspiration and confirmation...I think I got this now.
 
Top Bottom