当前位置:网站首页>Workplace Experience Sharing--Details that are easily overlooked when checking data by timestamp in the interface
Workplace Experience Sharing--Details that are easily overlooked when checking data by timestamp in the interface
2022-08-07 18:53:00 【Xiaobo Test Growth Road】
Background
Generally, when the data in a table needs to be obtained from external/downstream interfaces, a series of interfaces will be designed, which may include paging query by primary key, incremental data query by update time, etc.If the table involves time fields, such as updateTime, and the business involves multiple countries, the time may be converted to 0 time zone for storage.In this case, it is also to be able to do corresponding processing according to the local time zone when the time is displayed in other places later.
Next, I will share a small detail that I overlooked when testing an interface today
If I now want to test an interface that obtains incremental data according to the timestamp of the specified updateTime, one of the test scenarios is: find the record with the largest updateTime from the table, and then convert this time into a timestamp to callInterface to check whether the update time of the returned data is >= the time corresponding to the incoming timestamp.
Assume that the time when the database is found is 2022-08-04 01:11:30, and then I found a timestamp conversion tool on the Internet. The problem appeared on the conversion tool I was looking for:

I compare the timestamp of Beijing time converted by this URL with the data in the database. It is actually wrong. The corresponding time should be converted to the timestamp of time zone 0, yesConvert with the following address: https://www.baidufe.com/fehelper/timestamp/index.html

Or, you need to add a time difference of 8 hours to the timestamp of Beijing time, that is, add 8 * 3600 * 1000 milliseconds.
The above is a small detail that I overlooked when I was testing the interface today. Of course, you can also modify the description, and change it to a certain function in the system due to a similar reason. There is a bug, and moreA bug that impresses you.
If you think the article is helpful to you, please like, forward and support it~
Past recommendations
Those bugs that impressed me--01
The bugs that impressed me--02
Those bugs that impressed me--03
Those bugs that impressed me--04
Those bugs that impressed me--05
边栏推荐
猜你喜欢

ADS127L11 Acquisition Board System Noise Evaluation

ctfshow七夕杯web

2022-8-7

宝塔实测-在线药店商城源码带WAP版

国内多位架构大牛强烈推荐的大型分布式手册

【板栗糖GIS】DOS—如何在当前文件夹内部批量建子文件夹

English Convert - Online English Batch Converter Free

After love or edge after executives adjustment: life ZhuangHai Wang Jing as CFO for President

【Token】JWT uses Token to log in

第61章 Jquery JSON Table EntityFrameworkCore自动生成数据库
随机推荐
在vscode里打开IntelliSense配置的方法
Translation Assistant - Free Translation Assistant Download
企业文化如何治好企业“内耗”?
Kuaishou management adjustment: Liu Feng and Ma Hongbin are respectively in charge of commercialization and internationalization
Changan chain fact example contract stateddb storage data original text with cmecv1.0 reason analysis
vulnhub靶场serial-php渗透
百万年薪架构师谈:掌握这【6+2】学习路线 进BAT拿月薪40k真不难
word翻译-批量word翻译
9.paddlepaddle中squeeze的用法,裁剪到想要维度
1、一颗芯片是如何诞生的
第三章 运算符与标识符与关键字
Haochen Software IPO meeting: annual revenue of 240 million to raise 750 million Sequoia is a shareholder
SAS Planet下载卫星地图
[2022 牛客多校2 E] Falfa with Substring (二项式反演 NTT)
Free translation software - batch automatic one-click translation
[chestnut sugar GIS] DOS - how to delete a specific folder
【板栗糖GIS】DOS—如何提取文件夹名称
C# calls bartender for dynamic printing and complete tutorial of batch printing
ResNet Architecture Analysis
英文转换-在线英文批量转换器免费