[Maria-discuss] java.sql.Timestamp works in MySQL, fails in MariaDB
28 Mar
2016
28 Mar
'16
2:05 p.m.
Recently I changed servers, my old server was running MySQL and my Java code worked perfectly. My new server is apparently running Ver 15 5.5.44-MariaDB, for Linux (x86 64) The following code works and has worked perfectly well for the past 4 years java.sql.Timestamp transactionTimestamp = new java.sql.Timestamp(System.currentTimeMillis()); PreparedStatement pstmt ... pstmt.setTimestamp(4, transactionTimestamp); pstmt.executeUpdate(); // EPIC FAIL, writes all 0s to the database I'm currently using mysql-connector-java-5.1.22-bin.jar in WEB-INF/lib Can anyone throw any light on this please? Many thanks Lyallex
3157
Age (days ago)
3157
Last active (days ago)
0 comments
1 participants
participants (1)
-
Lyallex