gpt4 book ai didi

php - 在 PHP 中将 TIMESTAMP 转换为 unix 时间?

转载 作者:IT王子 更新时间:2023-10-28 23:44:55 25 4
gpt4 key购买 nike

目前我将时间存储在我的数据库中,如下所示:2010-05-17 19:13:37

但是,我需要比较两次,我觉得如果是unix时间戳,例如1274119041,会更容易做。 (这两次是不同的)

那么如何将时间戳转换为 unix 时间戳?有没有简单的php函数呢?

最佳答案

您正在寻找 strtotime()

关于php - 在 PHP 中将 TIMESTAMP 转换为 unix 时间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2850624/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com