mevdschee / mevdschee/php-crud-api

Support ISO 8601 timezoned datetime format

Open
#419 9 comments 2 reactions 1 assignee View on GitHub

@mevdschee is already working on this.

Since Sep 1, 2018.

enhancement
Dominant language
PHP
Stars
3.7k
Forks
1k
Avg merge
1h 55m
Merged PRs (30d)
7

Description

Hi,

First of all, thanks for this awesome project. I'm using this nice and simple PHP CRUD for the back-end of an Angular Web App, together with a MYSQL database.

The issue I'm currently having is that when I'm trying to POST a new object with a date(time) type, it throws an error.
SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '2018-09-01T13:41:41.191Z' for column 'start_date' at row 1". I did some research and discovered that MYSQL expects a format like Y-m-d H:i:s for a datetime type.

I would prefer to solve this issue on PHP/back-end side instead of trying to fix it in Angular. Is there any quick/ready solution to his, or do I need to manually dig into the code and try to fix this?

Thanks!
Jérémy

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.