Time Zone
my site showing different time. where can i Set my time , i have to set Indian Standard time there is difference of 30 Min.
I m Using Vanilla 2.2
thankyou
0          
            my site showing different time. where can i Set my time , i have to set Indian Standard time there is difference of 30 Min.
I m Using Vanilla 2.2
thankyou
Comments
in file bootstrap.php in your root on line 40 there is your timezone
// Make sure a default time zone is set date_default_timezone_set('UTC');I have made change in bootstrap as well as config but still there is time lag of 30 min.
btw Thanks for response
These timezones are supported by php: http://php.net/manual/en/timezones.indian.php
No, this is absolutely wrong.
In your
conf/config.phpadd this (substituting your own timezone):$Configuration['Garden']['GuestTimeZone'] = 'America/Detroit';@excuse_me Unfortunately, Vanilla does not currently support half-hour differences in timezones, only full hours.
So there is no way to set this time ?
...
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
This seems to work when putting in index.php:
// set custom time $offset = '+5:30'; // 5 hours and 30 minutes later // Calculate seconds from offset list($hours, $minutes) = explode(':', $offset); $seconds = $hours * 60 * 60 + $minutes * 60; // Get timezone name from seconds $tz = timezone_name_from_abbr('', $seconds, 1); // Workaround for bug #44780 if($tz === false) $tz = timezone_name_from_abbr('', $seconds, 0); // Set timezone date_default_timezone_set($tz); ini_set('date.timezone', $tz);The operative word being seems. You are altering your server's timezone (and therefore how time data is stored) rather than just altering the output. You are potentially creating a world of hurt for yourself.
ConPHPucious say:
I agree @Linc. Was just testing with some things...