Store Date to UTC one-liner by PHP -


i understand best practice store dates utc databases quite confused in scenario in. let's have form end-user inserts date "07-15-2016" in eastern timezone. necessary store utc date or as-is since it's not datetime?

i'm using one-liner in php sanitize date format before insert database.

// user input 07-15-2016 , formatted 2016-07-15 00:00:00 $userdate = datetime::createfromformat('m-d-y', '07-15-2016')->format('y-m-d h:i:s')); 

is there make sure nothing messes since user-input est; meanwhile, time 00:00:00?


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -