简体   繁体   English

Android Studio sqlite时间12:00变为00:00

[英]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.

相关问题 使用Calendar对象将“12:00”更改为“00:00” - “12:00” changed to “00:00” with Calendar object 获取的安卓蓝牙MAC为02:00:00:00:00:00 - Android bluetooth MAC obtained is 02:00:00:00:00:00 当我将时间设置为12:00或00:00时,Time Picker不起作用,其显示的是AM而不是Pm - Time Picker is not working when i set time 12:00 or 00:00 its displaying AM instead Pm 这个“2020-12-31T02:00:00+05:30”字符串响应如何在 Android Studio 中转换为 31/12/2020, 02:00 pm? - How this “2020-12-31T02:00:00+05:30” string response be convert to 31/12/2020, 02:00 pm in Android Studio? Android无法解析的日期:“ 2017-12-01 00:00:00 + 01” - Android Unparseable date: “2017-12-01 00:00:00+01” 解析日期 android 0-24 与 12:00 - Parse Date android 0-24 with 12:00 在android中格式化时间计​​数器字符串,例如260到00:00:00 - Format time counter string e.g. 260 to 00:00:00 in android 在00:00:00 am获取本周第一天的开始时间 - Get start time of week's first day in 00:00:00 am android 将“11:00 至 12:00”转换为“11:00 am 至 12:00 pm” - Convert "11:00 to 12:00" TO "11:00 am to 12:00 pm" WifiInfo.getMacAddress()在Android 6.0设备中返回02:00:00:00:00:00 - WifiInfo.getMacAddress() returns 02:00:00:00:00:00 aways in Android 6.0 device
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM