Welcome Guest, Not a member yet? Register   Sign In
Converting a user submitted date to GMT
#2

Honestly, I've always had trouble trying to figure out the intended method of working with the CI timezones, because there seem to be too many pieces missing to make it possible to really convert between user, application, and server timezones. For this reason, I created a very crude function (which can be placed in a MY_date_helper.php file to be loaded whenever the CI date_helper is loaded) to get a PHP timezone string from a CI timezone string. Then you can use PHP's built-in DateTime methods to convert the date/time to GMT.
Reply


Messages In This Thread
RE: Converting a user submitted date to GMT - by mwhitney - 07-02-2015, 08:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB