LoginSignup
0
0

More than 3 years have passed since last update.

Laravel Telescopeのタイムゾーンを強制的に日本時間にする

Posted at

LaravelのTelescopeにおいて、タイムゾーンを指定してるにもかかわらず日本時間表示ができなかったので、強制的に変えてみました!

localTime()を下記のように修正

vendor/laravel/telescope/resources/js/base.js
        localTime(time) {
            return moment.tz(time,'Asia/Tokyo')
                .format('YYYY-MM-DD HH:mm:ss');
        },

   cd /LARAVEL_PATH/vendor/telescope
   npm run prod 
   cd /LARAVEL_PATH
   php artisan telescope:publish --force

cross-envをインストールする必要あり
ない場合は

npm install cross-env

以上です(^^)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0