gmt + 6中的24小时时间格式 [英] 24 hour time format in gmt+6
问题描述
我现在准时到达gmt + 6
我希望以24小时时间格式看到我的时间。我写了代码:
I am now in a place on time under gmt+6
I want to see my time in 24 hour time format. I wrote the code :
date_default_timezone_set('Etc/GMT+6');
echo $date2=date("H:i:s");
但它显示的时间为12小时格式,如现在10: 02:00。
但我只写下面一行
echo $ date2 = date( H:我:s);
它以12小时格式显示我的时间,但总是减少4小时。即它要显示22:02:00但它显示18:02:00
我想要解决方案。请把你的ans。
提前谢谢.......
But it shows time in 12 hour format like now 10:02:00 .
but whet I write only the following line
echo $date2=date("H:i:s");
It shows me time in 12 hour format but always take 4 hour less . i.e it want to show 22:02:00 but it shows 18:02:00
I want solution. Please put your ans.
Thanks in advance.......
推荐答案
date2 = date( H:i:s);
date2=date("H:i:s");
但它以12小时格式显示时间,如现在10:02:00。
但是我只写了以下行
echo
But it shows time in 12 hour format like now 10:02:00 .
but whet I write only the following line
echo
date2 = date(H:i:s);
它以12小时格式显示时间,但总是减少4小时。即它要显示22:02:00但它显示18:02:00
我想要解决方案。请把你的ans。
提前谢谢.......
date2=date("H:i:s");
It shows me time in 12 hour format but always take 4 hour less . i.e it want to show 22:02:00 but it shows 18:02:00
I want solution. Please put your ans.
Thanks in advance.......
这是正确的,它显示10: 02:00,恰好与12小时格式相同。您可以通过在 timezoneconverter.com 输入Etc / GMT + 6来验证当前日期时间[ ^ ]。此时,它显示2014年6月6日星期五11:09 A.M。
It is correct, it showed 10:02:00 hrs, just happen to be the same as 12 hour format. You can verify the current date time by entering out 'Etc/GMT+6' at timezoneconverter.com[^]. At this moment, it show Fri 6-Jun-2014 11:09 A.M.
这篇关于gmt + 6中的24小时时间格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!