I build android apps using flutter and laravel rest api.
but I get start_time with this format (yyyy-mm-ddthh:mm:ss.sssz) on postman
:
on database sql server
it looks fine:
Can some one help me to convert starttime data? this make a wrong time output. I've tried to change model on laravel like this. but it make error '500' when user input data.
maybe you can try this on your flutter :
final starttime = DateTime.parse(cutiData['start_time']).toLocal();
final endtime = DateTime.parse(cutiData['end_time']).toLocal();
ANd you call in return as string:
starttime.toString(),
endtime.toString(),