找出在某个日期时间以来unix纪元的时间? [英] Find out the time since unix epoch for a certain date time?

查看:102
本文介绍了找出在某个日期时间以来unix纪元的时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在2009年10月1日的9:00 BST上找到Unix时间(即unix时代以来的秒数)的时间。我如何在linux命令行上执行此操作?

I want to find out the time in unix time (ie seconds since the unix epoch) on 9:00 BST on 1st October 2009. How can I do this on the linux command line?

我知道你可以使用 date @ $ UNIXTIME'+%someformat',但unix时间是我想要弄清楚的p>

I know you can use date @$UNIXTIME '+%someformat', but the unix time is what I'm trying to figure out

推荐答案

因此使用 date

date --date="Oct 1 09:00:00 BST 2009" +%s

收益:

1254384000

这篇关于找出在某个日期时间以来unix纪元的时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆