3/2/2023 0 Comments Sqlite timestampMoving some business logic into a database might seem like a good idea but in many cases it’s not. Conclusionĭatabases are full of quirks and this particular problem is just a tip of the iceberg. So, what can we do about that?Ī bit hacky, isn’t it? Databases are fun. Well, they won’t fix this thing any time soon, that’s for sure. It seems like Java interpretation is correct and SQLite breaks IS0 8601 by using spaces instead of T. The date and time functions use a subset of IS0-8601 date and time formats. Here is what SQLite documentation says about that: That’s odd, I thought SQLite uses the standard date and time formats. There is no doubt that ISO 8601 doesn’t allow spaces in date strings and Java date parser rightfully fails when it stumbles upon illegal characters. Separating date and time parts with other characters such as space is not allowed in ISO 8601. It is permitted to omit the ‘T’ character by mutual agreement as in ‘200704051430’. Let’s see if this standard allows spaces:Ī single point in time can be represented by concatenating a complete date expression, the letter ‘T’ as a delimiter, and a valid time expression. In fact, the only date format LocalDateTime supports is ISO 8601.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |