PHP strtotime with output from Bootstrap DatePicker -
bootstrap time picker gives me date in format:
mon mar 16 2015 00:00:00 gmt-0500 (central daylight time)
i use date object in php.
i attempting use like:
date("y-m-d h:i:s" , strtotime("mon mar 16 2015 00:00:00 gmt-0500 (central daylight time)"));
but results in:
1969-12-31 18:00:00
which understand pretty close epoch.
i'm thinking i'm either using wrong function, or formatted date() wrong.
i using timepicker here.
strtotime works on formats of can found here http://php.net/manual/en/datetime.formats.php
mar 16 2015 00:00:00 gmt-0500
the above portion should return right time value you. either change way picker outputting date, without knowing picker assume 1 http://bootstrap-datepicker.readthedocs.org/en/latest/options.html#format or string manipulation on current date format picker (the first option simpler , easier read).
Comments
Post a Comment