This section shows you how to install this bundle
"require": {
"lunetics/timezone-bundle": "2.1.*",
....
},
If you want the bleeding-edge version, add this instead of above:
"require": {
"lunetics/timezone-bundle": "dev-master",
....
},
public function registerBundles()
{
$bundles = array(
// ...
new Lunetics\TimezoneBundle\LuneticsTimezoneBundle(),
);
php composer.phar update lunetics/timezone-bundle
Add the following lines to your app/config/config.yml
lunetics_timezone:
guesser:
order:
- geo
- locale_mapper
- locale
The easiest way to install the pecl geo
extension is to run:
pecl install geoip
There shoult be a meta-package in your distributions, e.g. pecl-geoip
port in FreeBSD or php5-geoip
in Ubuntu.
You also need to install the GeoLiteCity.dat file to use the locale
guesser.
- Download http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
- gunzip the file
- Rename the file to GeoIPCity.dat and move it to
/usr/share/GeoIP/