the182guy Posted August 24, 2009 Share Posted August 24, 2009 Hi all, What's the best way to convert this datetime string into HH:MM? Example string is 2009-08-25T13:15:00.000Z I can easily parse the 13:15 out of that but the problem is the Daylight Savings Time. The timestring is not in DST, so they are 1hr behind, I need to somehow add 1 hour to the time if we're currently in DST. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/171688-solved-convert-datetimestring-2009-08-25t131500000z/ Share on other sites More sharing options...
Zane Posted August 24, 2009 Share Posted August 24, 2009 date("G:i", strtotime("2009-08-25T13:15:00.000Z")); Quote Link to comment https://forums.phpfreaks.com/topic/171688-solved-convert-datetimestring-2009-08-25t131500000z/#findComment-905357 Share on other sites More sharing options...
the182guy Posted August 24, 2009 Author Share Posted August 24, 2009 Perfect, thanks zanus Quote Link to comment https://forums.phpfreaks.com/topic/171688-solved-convert-datetimestring-2009-08-25t131500000z/#findComment-905413 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.