mysql - Angular API date not working: timestamp from PHP backend needs to be refactored? -


i having no luck using angular's date api. else no longer working on app wrote backend in php , database mysql..

i think original timestamp that's being used on backend perhaps "not play nice" angular's date api , wondering if showing suggest that, perhaps, "yes!" indeed way storing date , time in our backend , db what's causing angular not display date format want.

i did search in php code , found following , wondering if should change timestamp.. or have wrong approach this?

/applications/mamp/htdocs/myapp/myapp.sql:    140    `car_id` int(11) not null,   141    `company_id` int(11) not null,   142:   `driver_departing_time` timestamp not null default '0000-00-00 00:00:00',   143    `driver_arrival_time` timestamp not null default '0000-00-00 00:00:00',   144    `departing_date` timestamp not null default '0000-00-00 00:00:00', 

the way store dates in database should not matter. important way in application communicates server. example, if it's using rest service, should check date format required service requests , format date either on client or on server side.

i'm not familiar php won't tell how check in code. however, can use browser development tools (e.g. network tab in google chrome) check format in server sends dates. then, can format them on client side moment.js library or using other method.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -