具有欧洲日期格式的 Strtotime [英] Strtotime with European date format

查看:49
本文介绍了具有欧洲日期格式的 Strtotime的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 strtotime 转换以下日期:

I'm trying to use strtotime to convert the following date:

07/09/2009 17:01:27

07/09/2009 17:01:27

这是 9 月 7 日的欧洲/伦敦时区格式

It's the Europe/London timezone format for 7th of September

该功能正在反转月份和日期,有什么解决方法吗?谢谢

The function is inverting the month and the days, is there any workaround? thanks

推荐答案

尝试:

strtotime(07/09/2009 17:01:27 GMT);

或者先试试这个:

date_default_timezone_set('Europe/London');

我想最好的答案是不要使用 strtotime,因为它的准确性永远不可能达到 100%

i guess the best answer is to not use strtotime as you can never be 100% with its accuracy

这篇关于具有欧洲日期格式的 Strtotime的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆