Warning: include_once(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /home/users/2/moriya-h5/web/confrage/unix/unix_command/date/date.html on line 2

Warning: include_once(http://www.confrage.com/bin/header.php): failed to open stream: no suitable wrapper could be found in /home/users/2/moriya-h5/web/confrage/unix/unix_command/date/date.html on line 2

Warning: include_once(): Failed opening 'http://www.confrage.com/bin/header.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/unix/unix_command/date/date.html on line 2
date | UNIX | 株式会社CONFRAGE
Warning: include_once(/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/menu.php): failed to open stream: No such file or directory in /home/users/2/moriya-h5/web/confrage/unix/unix_command/date/date.html on line 17

Warning: include_once(): Failed opening '/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/menu.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/unix/unix_command/date/date.html on line 17
date
dateコマンドは日本標準時(JST)を表示するコマンドです。
使用方法は

date

というように実行すると以下のようにJSTが表示されます。

Tue Feb 12 15:38:46 JST 2007

上記、表示フォーマットを変更したい場合は + をつけてフォーマットを指定します。
以下はyyyymmdd形式で表示する例です。

% date +%Y%m%d
20070213
%
前日を表示
dateコマンドで、-vオプションを使用して前日を計算することが出来ます。
但し、AIXサーバなどの-vオプションが使用できない場合、現在時刻から前日を計算したい場合は、以下のように環境変数を変更して前日日付を表示します。

env TZ=JST+15 date +%Y%m%d

Back to top

Information

Warning: include_once(/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/side_bar.php): failed to open stream: No such file or directory in /home/users/2/moriya-h5/web/confrage/unix/unix_command/date/date.html on line 81

Warning: include_once(): Failed opening '/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/side_bar.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/unix/unix_command/date/date.html on line 81

Warning: include_once(/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/seo.php): failed to open stream: No such file or directory in /home/users/2/moriya-h5/web/confrage/unix/unix_command/date/date.html on line 90

Warning: include_once(): Failed opening '/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/seo.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/unix/unix_command/date/date.html on line 90