nathanheffley / laravel-watermelon

Easily set up a sync endpoint to support Watermelon DB in your Laravel projects.
MIT License
46 stars 13 forks source link

Incorrect date formatting created_at #12

Open sweebee opened 2 months ago

sweebee commented 2 months ago

I'm trying this package, but it doesnt seem to work when pushing changes:

Incorrect datetime value: '56578-08-03 05:33:14' for column 'created_at' at row 1
nathanheffley commented 2 months ago

That is indeed an invalid timestamp. Are you generating that timestamp or is there a stack trace associated with this to see what line of code is generating that timestamp?

nathanheffley commented 2 months ago

I guess I should say, it is probably invalid due to the year but I don't know what database you're leaving.

If you can provide me with some information like your database and the stack trace, tell me what date you're trying to put into the database (if it really is the date you want, why? Please use reasonable data to replicate the issue, I am unlikely to release a bugfix because dates 10k years in the future don't work).

propsu commented 1 month ago

The issue propably is caused by timestamp in your frontend which is in miliseconds