Convert String to java.util.Date

后端 未结 4 494
猫巷女王i
猫巷女王i 2020-11-27 18:46

I am storing the dates in a SQLite database in this format:

d-MMM-yyyy,HH:mm:ss aaa

When I retrieve the date with that format I am get ever

4条回答
  •  孤独总比滥情好
    2020-11-27 19:40

    You should set a TimeZone in your DateFormat, otherwise it will use the default one (depending on the settings of the computer).

提交回复
热议问题