Developed with love by KnpLabs Hire us for your project!
47

TimezoneBundle

by lunetics

A Symfony2 Bundle for Serverside Timezone detection

TimezoneBundle

The TimezoneBundle adds support for guessing a appropiate Timezone serverside in your Symfony 2.1 application.

Latest Stable Version
Build Status
Scrutinizer Code Quality
Code Coverage

Latest Unstable Version
Total Downloads
License

About

This Bundle offers Timezone detection via a Kernel-listener.
Also included is a TimezoneValidator.

Included are 3 TimezoneGuessers

  • geoip
  • locale_mapper
  • locale

You can define the order of which guesser should be called first.
Once a guesser finds a appropiate timezone, the timezone will be stored in the session variable lunetics_timezone.

Requirements

To use the geoip guesser and the locale guesser, the pecl-geoip extension must be installed and working.

Documentation

Read the Documentation

Installation

Read the Documentation

License

This bundle is under the MIT license.

Authors

Matthias Breddin : @lunetics

Copyright (c) 2012 Matthias Breddin <mb@lunetics.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
lunetics_timezone:
session_var: lunetics_timezone
default_timezone: UTC
guesser:
manager:
class: Lunetics\TimezoneBundle\TimezoneGuesser\TimezoneGuesserManager
listener:
class: Lunetics\TimezoneBundle\EventListener\TimezoneListener
order: [] # Required
service:
geo:
class: Lunetics\TimezoneBundle\TimezoneGuesser\GeoTimezoneGuesser
locale_mapper:
class: Lunetics\TimezoneBundle\TimezoneGuesser\LocalemapperTimezoneGuesser
locale:
class: Lunetics\TimezoneBundle\TimezoneGuesser\LocaleTimezoneGuesser
  • Merge pull request #15 from lunetics/fix_deprecation
    By lunetics, 2 years ago
  • Chang Test to ignore deprecated messages
    By lunetics, 2 years ago
  • Merge pull request #14 from t0k4rt/patch-1
    By lunetics, 2 years ago
  • Updated Execution context mock
    By , 2 years ago
  • Update .travis.yml
    By t0k4rt, 2 years ago
  • updated github download address
    By t0k4rt, 2 years ago
  • fix wget error when downloading data file
    By t0k4rt, 2 years ago
  • Merge pull request #13 from nurikabe/patch-3
    By lunetics, 2 years ago
  • Update installation.md
    By nurikabe, 2 years ago
  • Merge pull request #12 from ifdattic/patch-1
    By lunetics, 2 years ago
  • Fix links in documentation
    By ifdattic, 2 years ago
  • Removed unused Statement
    By lunetics, 2 years ago
  • Merge branch 'master' of https://github.com/lunetics/TimezoneBundle
    By lunetics, 2 years ago
  • Removed request from Event
    By lunetics, 2 years ago
  • Merge pull request #9 from nurikabe/patch-2
    By lunetics, 2 years ago
  • Configuration check for default timezone. Changed timezoneprovider. Changed Tests
    By lunetics, 2 years ago
  • Added default timezone to config (default UTC)
    By lunetics, 2 years ago
  • Use Request in Event
    By lunetics, 2 years ago
  • Added custom exception
    By lunetics, 2 years ago
  • Corrected docs
    By lunetics, 2 years ago
  • Updated Readme
    By lunetics, 2 years ago
  • Cache apt in travis
    By lunetics, 2 years ago
  • Updated Travis buildfile
    By lunetics, 2 years ago
  • Updated minimum Symfony version to 2.2
    By lunetics, 2 years ago
  • Added Badges
    By lunetics, 2 years ago
  • Use Validatorinterface
    By lunetics, 2 years ago
  • Using custom channel for Timezone, removed logevent
    By lunetics, 2 years ago
  • More descriptive error when .dat files cannot be found.
    By nurikabe, 3 years ago
  • Merge pull request #7 from nurikabe/patch-1
    By lunetics, 3 years ago
  • Merge pull request #8 from nurikabe/master
    By lunetics, 3 years ago