当前位置:网站首页>MySQL time, time zone, auto fill 0
MySQL time, time zone, auto fill 0
2022-07-06 12:16:00 【A pole】
Database time update problem 2022/4/13
When the database updates user information , The registration time will be updated every time , I'm really confused about this wave .
At first I thought it was mybatis By the way, I updated the registration time , Then I checked the code , No problem found , open mybatis Look at the log ,sql The statements are also correct , I don't see the code that updates the registration time at all .
Think about it. , Maybe it's the database . It is found that the registration time field is checked Update... Based on the current timestamp The option to , Suddenly understand , The original option is that this field will be updated every time the content is updated . Test the code after canceling , Everything is all right .
Database time zone error 2022/4/20
Today, I debugged an interface , Involving time , I am from Java Get the current time and then go to the database ( In fact, I think using the database now
It's fine too ), Then something went wrong , The time saved is several hours slower than the actual time .
I think about it , Will not be new Timestamp(System.currentTimeMillis());
It's a matter of time for this code to get , Tested decisively , Discovery is not its problem , That must be the problem of the database , But I think the time when the database automatically updates the timestamp is correct . Think about it. , Maybe when you turn around , Time zone problem .
Written before yaml When configuring a file , Always follow the teacher's writing , That's what the teacher wrote jdbc:mysql://127.0.0.1:3306/blog?serverTimezone=UTC
, It turned out that I was 100 degrees , good heavens , This time zone is the universal time , It's slower than Beijing 8 Hours , Change to serverTimezone=Asia/Shanghai
It's settled. .
Database population 0 2022/4/20
stay mysql5.6 in ,int And other digital types can be selected fill 0
.
fill 0 It does not mean that the default value is 0, But to On display , Fill to the left by default 0, namely 20 It will be displayed. 0000000020 , Of course, on the left 0 Not necessarily as much as I wrote , Here I am just making an analogy .
If you don't want to automatically fill so many 0, Cancel... Directly
Fill in zero
This is the option .
边栏推荐
- RT thread API reference manual
- .elf .map .list .hex文件
- OSPF message details - LSA overview
- Pytoch temperature prediction
- Variable parameter principle of C language function: VA_ start、va_ Arg and VA_ end
- Arduino get random number
- Feature of sklearn_ extraction. text. CountVectorizer / TfidVectorizer
- Mysql database interview questions
- Whistle+switchyomega configure web proxy
- Embedded startup process
猜你喜欢
Basic operations of databases and tables ----- classification of data
Kaggle竞赛-Two Sigma Connect: Rental Listing Inquiries
AMBA、AHB、APB、AXI的理解
Basic operations of databases and tables ----- modifying data tables
IOT system framework learning
Redis based distributed locks and ultra detailed improvement ideas
Reno7 60W超级闪充充电架构
Classification, understanding and application of common methods of JS array
几个关于指针的声明【C语言】
Redis 缓存更新策略,缓存穿透、雪崩、击穿问题
随机推荐
Variable parameter principle of C language function: VA_ start、va_ Arg and VA_ end
MySQL takes up too much memory solution
Basic operations of databases and tables ----- creating data tables
小天才电话手表 Z3工作原理
RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED
MySQL时间、时区、自动填充0的问题
【ESP32学习-2】esp32地址映射
open-mmlab labelImg mmdetection
ARM PC=PC+8 最便于理解的阐述
Feature of sklearn_ extraction. text. CountVectorizer / TfidVectorizer
Working principle of genius telephone watch Z3
Characteristics, task status and startup of UCOS III
AMBA、AHB、APB、AXI的理解
Custom view puzzle getcolor r.color The color obtained by colorprimary is incorrect
Knowledge summary of request
JS object and event learning notes
Pytorch-温度预测
列表的使用
RT thread API reference manual
The first simple case of GNN: Cora classification