getting user set timezone

Post Reply
arfa
Master Bludit
Posts: 156
Joined: Tue Jul 04, 2017 4:31 am
Location: New Zealand
Has thanked: 13 times
Been thanked: 26 times

Is there a standard call to get the user set timezone?
eg Pacific/Auckland (GMT+12:00)

I figure it is saved in there somewhere - just how to get it out?

thx - Kusalo
User avatar
zacharielle
Ssr. Bludit
Posts: 13
Joined: Sat Jan 07, 2023 7:51 am
Has thanked: 11 times
Been thanked: 10 times

I don't think this is a user related data, rather a site config one? If this is what you are looking for there is the timezone() function from Site class you can call to get the info:

Code: Select all

<?php echo $site->timezone(); ?>
arfa
Master Bludit
Posts: 156
Joined: Tue Jul 04, 2017 4:31 am
Location: New Zealand
Has thanked: 13 times
Been thanked: 26 times

As is often the case the language, the jargon, the question needs aligning. Yes, that does the trick. Thank you.
Post Reply