Jump to content

MariaDB - Need help - Incorrect datetime value: '2018-03-25 02:23:24'

Go to solution Solved by Joveice,

Friend helped me out.

Well turns out, it's due to DST which I guessed, but I didn't quite figure it out, well it was nothing more than that the dates are invalid :P

Suggestion was to set to gmt. Which I did and it allowed me to continue with my dump, some dates will be wrong here, but it does not do anything bad. New dates will be correct as I will reflect it in the software.

This is my error

ERROR 1292 (22007) at line 85: Incorrect datetime value: '2018-03-25 02:23:24' for column 'created_at' at row 81

How do I fix this? I have figured out that it may have to do with Daylight savings. I'm trying to import the backup from my old server to my new one.

The system is running the timezone Europe/Oslo and we still use those weird summer and winter times (CET, CEST)

 

Back-end developer, electronics "hacker"

Link to comment
Share on other sites

Link to post
Share on other sites

56 minutes ago, Joveice said:

This is my error


ERROR 1292 (22007) at line 85: Incorrect datetime value: '2018-03-25 02:23:24' for column 'created_at' at row 81

How do I fix this? I have figured out that it may have to do with Daylight savings. I'm trying to import the backup from my old server to my new one.

The system is running the timezone Europe/Oslo and we still use those weird summer and winter times (CET, CEST)

 

More info

MariaDB [mydb]> insert into api_tokens values (x,'xxx',x,'2018-03-25 02:23:24',NULL);
ERROR 1292 (22007): Incorrect datetime value: '2018-03-25 02:23:24' for column 'created_at' at row 1

MariaDB [mydb]> insert into api_tokens values (x,'xxx',x,'2018-03-25 01:23:24',NULL);
Query OK, 1 row affected (0.003 sec)

MariaDB [mydb]> insert into api_tokens values (x,'xxx',x,'2018-03-25 03:23:24',NULL);
Query OK, 1 row affected (0.003 sec)

x is a ID and xxx is a token so I have removed those from this.

02:23:44 does not work but 01 and 03 does. Have I hit a bug?

Back-end developer, electronics "hacker"

Link to comment
Share on other sites

Link to post
Share on other sites

Friend helped me out.

Well turns out, it's due to DST which I guessed, but I didn't quite figure it out, well it was nothing more than that the dates are invalid :P

Suggestion was to set to gmt. Which I did and it allowed me to continue with my dump, some dates will be wrong here, but it does not do anything bad. New dates will be correct as I will reflect it in the software.

Back-end developer, electronics "hacker"

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×