LoginSignup
1
1

More than 5 years have passed since last update.

【殴り書き】Linuxでのうるう秒の調査

Last updated at Posted at 2015-05-26

えっと、まず初めに断っておくと、サーバーのことは良く分からないので、『ふーん』ぐらいで聞き流してくらさい。
コマンドの『date』を使って調査しました。
実行環境はUbuntu 14.04です。

2015-07-01 08:59:60をパースしてみる。

date -d '2015-07-01 08:59:60'

結果
date: invalid date ‘2015-07-01 08:59:60’

次に、2015-07-01 08:59:60を、タイムゾーン指定してパースしてみる

TZ=/usr/share/zoneinfo/right/Asia/Tokyo date -d '2015-07-01 08:59:60'

結果
date: invalid date ‘2015-07-01 08:59:60’

前回の2012-07-01 08:59:60をパースしてみる。

date -d '2012-07-01 08:59:60'

結果
date: invalid date ‘2012-07-01 08:59:60’

前回の2012-07-01 08:59:60を、タイムゾーン指定してパースしてみる

TZ=/usr/share/zoneinfo/right/Asia/Tokyo date -d '2012-07-01 08:59:60'

結果
Sun Jul 1 08:59:60 JST 2012


おおーー!?
前回のうるう秒はタイムゾーン指定するとちゃんと60秒が出てきますねー
でも今回のはエラーになるということは、アップデートしたらいいんかな?
2015年5月26日、apt-get update -yやってみたけど結果はかわらず。鯖はそっち専門の人に任せよう・・。

1
1
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
1
1