- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我有一个当前时间的 unix 时间戳。我想获取第二天开始的 unix 时间戳。
$current_timestamp = time();
$allowable_start_date = strtotime('+1 day', $current_timestamp);
正如我现在所做的那样,我只是将一整天的时间添加到 unix 时间戳,而我想弄清楚这一天还剩下多少秒,并且只添加那几秒以便获取第二天第一分钟的 unix 时间戳。
最好的方法是什么?
最佳答案
当时最简单的方式就是“make”:
$tomorrowMidnight = mktime(0, 0, 0, date('n'), date('j') + 1);
引用:
I would like to figure out how many seconds are left in this current day, and only add that many seconds in order to get the unix timestamp for the very first minute of the next day.
不要那样做。尽可能避免相对计算,特别是如果“绝对”获得没有秒算术的时间戳是微不足道的。
关于php - 如何在php中找到第二天开始的unix时间戳?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2520404/
给定一个带有多个 date_time 戳的字符串,我想 提取第一个戳及其前面的文本 候选字符串可以有一个或多个时间戳 后续的 date_time 戳记将被 sep="-" 隔开 后续date_time
是否可以合并从相机拍摄的文本和照片?我想在照片上标记日期和时间,但我在 Google 上找不到任何内容。 最佳答案 使用下面的代码来实现你所需要的。 Bitmap src = Bitm
有没有办法通过 Graph API 戳另一个用户?基于this post ,并使用 Graph Explorer ,我发布到“/USERID/pokes”,我已经授予它(Graph API 应用程序和
我有两个向左浮动的元素。一个是 body 的第一个 child ,另一个是容器的第一个 child ,容器是 body 的第二个 child 。 ...
我是一名优秀的程序员,十分优秀!