hp unix 如何实现date --date="2011-07-01" +%s中 --date参数的功能?实现传入个时间参数(例如:="2011-07-01"),然后在以传入的参数作为时间来将其转换为距格林威治时间的秒.我用man date看了,hp unix没发

来源:学生作业学帮网 编辑:学帮网 时间:2024/06/05 01:32:36

hp unix 如何实现date --date="2011-07-01" +%s中 --date参数的功能?
实现传入个时间参数(例如:="2011-07-01"),然后在以传入的参数作为时间来将其转换为距格林威治时间的秒.我用man date看了,hp unix没发现有类似--date的功能!

实在不行,用C写一个吧,从stdin读入参数,向stdout输出结果,就可以用在shell里了.