All Projects → yii2mod → yii2-timezone

yii2mod / yii2-timezone

Licence: MIT license
Timezone detector

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to yii2-timezone

yii2-presenter
Yii2 View Presenter
Stars: ✭ 13 (-7.14%)
Mutual labels:  yii2, yii2-extension
yii2-ion-slider
Easily customizable range slider with skins support.
Stars: ✭ 21 (+50%)
Mutual labels:  yii2, yii2-extension
yii2-sweet-submit
sweet sumit using sweetalert
Stars: ✭ 26 (+85.71%)
Mutual labels:  yii2, yii2-extension
ar-variation
Variation behavior for ActiveRecord
Stars: ✭ 46 (+228.57%)
Mutual labels:  yii2, yii2-extension
yii2-js-urlmanager
That extension provide a way to create urls from your frontend part.
Stars: ✭ 53 (+278.57%)
Mutual labels:  yii2, yii2-extension
yii2-payment
Yii2 Payment extension hổ trợ tích hợp các cổng thanh toán VnPayment, Onepay, Bảo Kim, Ngân Lượng, VTCPay, MoMo.
Stars: ✭ 20 (+42.86%)
Mutual labels:  yii2, yii2-extension
yii2-elasticsearch
Elasticsearch client based on official Elasticsearch PHP library
Stars: ✭ 14 (+0%)
Mutual labels:  yii2, yii2-extension
yii2-linkable-behavior
Yii2 behavior to help creating urls easier
Stars: ✭ 12 (-14.29%)
Mutual labels:  yii2, yii2-extension
ar-role
ActiveRecord behavior, which provides relation roles (table inheritance)
Stars: ✭ 34 (+142.86%)
Mutual labels:  yii2, yii2-extension
yii2-fileapi-widget
Yii2 FileAPI widget.
Stars: ✭ 51 (+264.29%)
Mutual labels:  yii2, yii2-extension
yii2-array-query
Yii2 component that allows for searching/filtering the elements of an array.
Stars: ✭ 34 (+142.86%)
Mutual labels:  yii2, yii2-extension
yii2-formbuilder
A drag and drop form builder with jQuery for Yii2
Stars: ✭ 33 (+135.71%)
Mutual labels:  yii2, yii2-extension
yii2-vote
Provides voting for any model 👍 👎
Stars: ✭ 70 (+400%)
Mutual labels:  yii2, yii2-extension
yii2-lock-form
disable the button when form submit
Stars: ✭ 37 (+164.29%)
Mutual labels:  yii2, yii2-extension
yii2-rollbar
Rollbar for Yii2
Stars: ✭ 36 (+157.14%)
Mutual labels:  yii2, yii2-extension
background-translation-i18n
Based on the YII2 module to translate JSON formatted translation files on the web
Stars: ✭ 11 (-21.43%)
Mutual labels:  yii2, yii2-extension
yii2-jwt-tools
An easy way to configure JWT authentication and validation on Yii Framework 2 Projects
Stars: ✭ 22 (+57.14%)
Mutual labels:  yii2, yii2-extension
yii2-bankcard-info
银行卡卡号分析(Yii2扩展)
Stars: ✭ 15 (+7.14%)
Mutual labels:  yii2, yii2-extension
yii2-emoji
😄 this is a emoji extension of yii2.
Stars: ✭ 17 (+21.43%)
Mutual labels:  yii2, yii2-extension
yii2-user
Flexible user registration and authentication module for Yii2.
Stars: ✭ 24 (+71.43%)
Mutual labels:  yii2, yii2-extension

Yii 2 Timezone

Timezone component for Yii 2

Latest Stable Version Total Downloads License

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist yii2mod/yii2-timezone "*"

or add

"yii2mod/yii2-timezone": "*"

to the require section of your composer.json.

Usage

Currently firefox and edge browsers are not supported.

Once the extension is installed, simply add component to your main config file:

    'bootstrap' => [
        'timezone'
    ]
    .....
    'components' => [
        'timezone' => [
            'class' => 'yii2mod\timezone\Timezone',
            'actionRoute' => '/site/timezone' //optional param - full path to page must be specified
        ],
    ]

Then add new action to any controller (SiteController by default)

public function actions()
    {
        return [
            'timezone' => [
                'class' => 'yii2mod\timezone\TimezoneAction',
            ],
        ];
    }

After configuration you can use Yii::$app->timezone->name to get current user's timezone.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].