将unix时间戳转换为android shell中的日期

将unix时间戳转换为android shell中的日期,第1张

概述我尝试将Debian时间戳转换为Androidshell(Tasker)中的日期,如:date-d@1487411077但是得到一些错误.怎么做?Tasker错误看起来像:12.32.45/Variablesdoreplresult:|shdate-d@%last|->|shdate-d@1487411077|12.32.45/Variablesdoreplresult:|shdate-d@%last|

我尝试将Debian时间戳转换为Android shell(Tasker)中的日期,如:

date -d @ 1487411077

但是得到一些错误.

怎么做?

Tasker错误看起来像:

12.32.45/Variables doreplresult: |sh date -d @%last| -> |sh date -d @1487411077|12.32.45/Variables doreplresult: |sh date -d @%last| -> |sh date -d @1487411077|12.32.45/E Shell Ausführen: %last -> %last12.32.45/E Shell Ausführen:  -> 12.32.45/E Shell Ausführen:  -> 12.32.45/Shell runBackground sh date -d @1487411077 root: true timeout: -112.32.45/Shell start process-thread ID 101312.32.45/E add wait type Shell1 time 214748364712.32.45/E add wait type Shell1 done12.32.45/E add wait task12.32.45/Variables doreplresult: |%last| -> |%last|12.32.45/E Fehler: 127

编辑:

AndroID日期是busyBox,我必须使用busyBox date -d @ 1487411077

解决方法:

由于AndroID的日期是busyBox日期,您应该可以:

date -D%s -d 1487411077

-D在2006年添加,同时支持-d @< epoch> àlaGNU于2010年添加.

总结

以上是内存溢出为你收集整理的将unix时间戳转换为android shell中的日期全部内容,希望文章能够帮你解决将unix时间戳转换为android shell中的日期所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1111980.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存