在这里,我有个约会条目默认mysql
如何转换时间gmt格式?
输入:'2017-03-9 06:27:28'
输出:'2017-03-9 11:27:28'
我想在GMT使用php
这次转换+5格式,请帮助我解决此问题的功能
在这里,我有个约会条目默认mysql
如何转换时间gmt格式?
输入:'2017-03-9 06:27:28'
输出:'2017-03-9 11:27:28'
我想在GMT使用php
这次转换+5格式,请帮助我解决此问题的功能
$string=strtotime("2017-03-9 06:27:28"); //converting time to timestamp
$timestamp=strtotime("+5 hours",$string);//added zone time
echo date("Y-m-d H:i:s", $timestamp); //displaying new time
谢谢亲爱的你的回答是有帮助的.....快乐编码:) –
@MudassarZahid欢迎... :) –
你能否请回顾我昨天的问题http://stackoverflow.com/questions/43047820/how-to-calculate -time-difference-with-schedule-working-bw-two-time-stamp –
您的日期字符串看起来已损坏。你至少能告诉我们你想要什么输出吗? –
请检查这个@TimBiegeleisen –
假设你将数据库中的日期格式存储在GMT中,并且假设你有日期类型,你会发现仅仅在查询本身中添加5个小时是可以接受的吗? –