Converting a user submitted date to GMT |
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.
|
Messages In This Thread |
Converting a user submitted date to GMT - by randy - 07-01-2015, 09:38 PM
RE: Converting a user submitted date to GMT - by mwhitney - 07-02-2015, 08:55 AM
RE: Converting a user submitted date to GMT - by randy - 07-02-2015, 06:22 PM
RE: Converting a user submitted date to GMT - by randy - 07-02-2015, 06:26 PM
RE: Converting a user submitted date to GMT - by mwhitney - 07-06-2015, 09:06 AM
RE: Converting a user submitted date to GMT - by kilishan - 07-06-2015, 09:41 AM
|