2017 © Pedro Peláez
 

yii2-extension yii2-timezone

Timezone helper

image

yii2mod/yii2-timezone

Timezone helper

  • Friday, July 1, 2016
  • by disem
  • Repository
  • 4 Watchers
  • 13 Stars
  • 1,202 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 5 Versions
  • 12 % Grown

The README.md

Yii 2 Timezone

Timezone component for Yii 2, (*1)

Latest Stable Version Total Downloads License, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

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

or add, (*5)

"yii2mod/yii2-timezone": "*"

to the require section of your composer.json., (*6)

Usage

Currently firefox and edge browsers are not supported., (*7)

Once the extension is installed, simply add component to your main config file:, (*8)

    '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), (*9)

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

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

The Versions

01/07 2016

dev-master

9999999-dev

Timezone helper

  Sources   Download

MIT

The Requires

 

component yii2

01/03 2016

1.0.3

1.0.3.0

Timezone helper

  Sources   Download

MIT

component yii2

29/02 2016

1.0.2

1.0.2.0

Timezone helper

  Sources   Download

MIT

component yii2

27/02 2016

1.0.1

1.0.1.0

Timezone helper

  Sources   Download

MIT

component yii2

17/06 2015

1.0

1.0.0.0

Timezone helper

  Sources   Download

MIT

component yii2