[英]Android studio sqlite time 12:00 becomes 00:00
i am using datepicker inside my project and storing the date and time inside sql database. 我在项目中使用datepicker并将日期和时间存储在sql数据库中。 so my problem is that when i chose time: 12:13 and store it inside the database, i try to retrieve this time and i get 00:13 instead of 12:13.
所以我的问题是,当我选择时间:12:13并将其存储在数据库中时,我尝试检索该时间,并且我得到00:13而不是12:13。 Only 12:00 ose not work
只有12:00不起作用
This is my format that I use to store: 这是我用来存储的格式:
SimpleDateFormat test = new SimpleDateFormat("yyyy-MM-d HH:mm:ss");
And this is raw from my sql create table : 这是从我的sql create table原始的:
work_time datetime NOT NULL
As you see this is datatime type, so any suggestion how to fix this? 如您所见,这是数据时间类型,那么有什么建议如何解决呢?
Humm... It seems that 00:00 means 12:00 in french time. 嗯...法国时间看来00:00表示12:00。 This isn't a bug or problem, its the way its set.
这不是错误或问题,而是它的设置方式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.