TimeZone discrepancy in mysql and java
问题 I have a query in mysql which compares 2 dates like this convert_tz(updatedDate,'+05:30','-05:00') < ? the convert function returns the value of column createddate in US Time. when I run this query in mysql query browser like convert_tz(updatedDate,'+05:30','-05:00') < '2013-04-14 09:30:00' it gives me correct values for example product count ------- ------ A 123 B 7 Now, I am setting this in java using PreparedStatement like this pst.setTimestamp(1, new java.sql.Timestamp(end.getTimeInMillis