TimeZone discrepancy in mysql and java

前端 未结 5 470
生来不讨喜
生来不讨喜 2021-01-18 05:36

I have a query in mysql which compares 2 dates like this

convert_tz(updatedDate,\'+05:30\',\'-05:00\') < ?

the convert function returns

5条回答
  •  天命终不由人
    2021-01-18 06:08

    Timezone information is not applied to dates/times unless you either set useTimeZone=true in your connection URL. You can use the getTimestamp() method also, which take calendars as an argument.

提交回复
热议问题