当前位置:网站首页>php判断当前时间有没有超过几点
php判断当前时间有没有超过几点
2022-06-22 03:41:00 【1002710030】
<?php
$sj="11:00:00"; //比如当天11点前的产量算前一天的
$dtrq = date('Y-m-d ',time()); //当天日期
$jz = strtotime($dtrq."$sj"); //拼接时间并转换成时间戳
$dq = time(); //当前时间的时间戳
if($dq <= $jz){
//判断时间戳大小
echo "未超时";
echo date("Y-m-d",strtotime("-1day",strtotime($dtrq))); //如果没超过11点,得出前一天的日期
}else{
echo "超时";
}
?>
边栏推荐
- C language integer value range - the problem of more than one negative number
- replacement has 2 rows, data has 0, 解决R语言如何动态生成dataframe
- 如何快速定位bug和编写测试用例?
- [leetcode] 17 backtracking (letter combination of telephone number)
- How did we solve the realsense color bias problem?
- 快速掌握 ASP.NET 身份认证框架 Identity - 用户注册
- Mysql 45讲学习笔记(四)索引
- 告警日志中出现ORA-48132 ORA-48170
- std::make_ Shared features
- Comment dart asynchrone est implémenté
猜你喜欢

基于51的超声波测距仪代码(截图版)

Beifu twincat3 third-party servo motor -- Taking Huichuan is620n servo as an example

AI自己写代码让智能体进化!OpenAI的大模型有“人类思想”那味了

Dart异步是怎麼實現

Dart异步是怎么实现

3DE position of moving object

MySQL index creation, optimization analysis and index optimization

MySQL 45 lecture notes (I) execution of an SQL statement

C51的一些日记

Kubernetes 集群日志管理
随机推荐
How to synchronize the oak camera?
svn高效管理怎么实现
Implementation of common function blocks for Beifu twincat3 servo control
Flutter-Stream使用
Docker install redis
Key program of TwinCAT 3 RS232 communication
所有项目的资源
Irregular naming
Nepal graph learning Chapter 2_ A bug before version v2.6.1 caused OOM
[leetcode] 17 backtracking (letter combination of telephone number)
How to implement dart asynchrony
Magic method "six"__ enter__ And__ exit__
GDB commissioning, use and sorting
Flutter-状态管理
Attributes, comments and field information of fields in MySQL query table
3DE recover from design
使用Expanded布局时报错The following assertion was thrown during performLayout
Mysql 45讲学习笔记(三)SQL更新语句的执行
我们如何解决了RealSense偏色问题?
Sword finger offer 68 - ii Nearest common ancestor of binary tree