タイムスタンプを取得/設定する
fname = "test.txt" s = File.stat(fname) p s.atime# 最終アクセス時刻 p s.mtime# 最終更新時刻 p File.atime(fname).strftime("%Y/%m/%d %H:%M:%S") p File.mtime(fname).strftime("%Y/%m/%d %H:%M:%S") # 今日の日付に変更する at = Time.now mt = Time.now File::utime(at, mt, fname) # 変更