时钟翻转事件

Let’s party like it’s 1999!

让我们狂欢吧,就像1999年一样!

You have probably written programs with a bug related to the calculation of time (I certainly have!). For example, you need to work out the number of days there is between two dates, such as between 29 November and 20 December, and calculate:

您可能编写了与时间计算有关的错误的程序(我当然有!)。 例如,您需要计算两个日期之间的天数,例如11月29日至12月20日,然后计算:

Days = Date (20,12) — Date (29,11)

天=日期(20,12)-日期(29,11)

and we get 21 days. And you remember that we will have a problem if we calculate over the New Year:

我们有21天的时间 您还记得,如果在新年期间进行计算,我们将遇到问题:

Days = Date (4,1) — Date (29,11)

天=日期(4,1)-日期(29,11)

So we add in the year, and we can determine the right number of days. But many developers just look at the last two digits in the year, and then perform their calculation, so that the days between 1/1/16 and 1/1/19 is three times the number of days in each year. But what happens when we roll over from 2019 to 2020?

因此,我们加上年份,就可以确定正确的天数。 但是许多开发人员只是查看一年中的最后两位数字,然后进行计算,因此1/1/16到1/1/19之间的天数是每年天数的三倍。 但是,当我们从2019年过渡到2020年时会发生什么?

让我们狂欢吧,就像1999年一样! (Let’s party like it’s 1999!)

So, at the start of the 21st Century, we had a problem in that developers had often using the last two digits of the year to perform their time calculations. This caused the Millennium Bug, and where many worried that control systems would crash when the 21st Century arrived. Luckily, the bugs had been mostly identified and it passed without many problems. Developers were told that they should always use system time calls which included the year in their calculations.

因此,在21世纪初,我们遇到了一个问题,即开发人员经常使用一年的最后两位数字来进行时间计算。 这导致了千年虫 ,许多人担心21世纪到来时控制系统会崩溃。 幸运的是,大多数错误已被识别出来,并且顺利通过了许多问题。 开发人员被告知,他们应始终使用系统时间调用,其中应将年份包括在计算中。

And so, this week, I received this:

因此,本周,我收到了以下信息:

And it basically sad that Splunk had a little bug around the turn-over of the date from 2019 to 2020. It looks like the code had just looked — as with the Millennium Bug — at the last two digits of the year, and that search functions could give the wrong result (and even where data could be deleted).

基本上令人难过的是,Splunk在2019年至2020年的日期变更期间存在一个小错误。看起来该代码就像在千年错误中一样,只在一年的最后两位数字出现了,并且进行了搜索函数可能会给出错误的结果(甚至可以删除数据)。

It relates to the processing of the datatime.xml file (see below), and which is used regular expression in order to parse incoming data. Unfortunately it only uses two digits of the data, and will not work correctly when the date rolls-over from 2019 to 2020. It is thought that it may either create an exception on the processing of data, or put the wrong timestamp. It is thought that the bug will start occurring on 13 September 2020 at 12:26 (UTC). There is an update to datatime.xml (and which is stored in the etc folder) here:

它涉及datatime.xml文件的处理(请参见下文),并使用正则表达式来解析传入的数据。 不幸的是,它仅使用两位数的数据,并且当日期从2019年过渡到2020年时将无法正常工作。据认为,这可能会在数据处理方面产生异常,或者会放置错误的时间戳。 据认为,该错误将从2020年9月13日12:26(UTC)开始发生。 这里是datatime.xml的更新(存储在etc文件夹中):

http://download.splunk.com/products/ingest2020/datetime.zip

http://download.splunk.com/products/ingest2020/datetime.zip

The bug is contained in here:

该错误包含在这里:

<!--   Version 4.0 --><!-- datetime.xml --><!-- This file contains the general formulas for parsing date/time formats. --><datetime><datetime><define name="_year" extract="year"> <text><![CDATA[(20\d\d|19\d\d|[901]\d(?!\d))]]></text></define>..</datetime>

and the updated version is:

并且更新的版本是:

<define extract="year" name="_year"><text><![CDATA[(20\d\d|19\d\d|[9012]\d(?!\d))]]></text></define>..</datetime>

With this “[9012]” identifies that the year can contain a “2”, and which is missing in the previous version. If you are interested, here’s the updates in the regular expressions:

使用此“ [9012]”标识年份可以包含“ 2”,并且在以前的版本中缺失。 如果您有兴趣,这里是正则表达式中的更新:

Comparing files datetime.xml and D:\DATETIME.XML***** datetime.xml<define name="_year" extract="year">        <text><![CDATA[(20\d\d|19\d\d|[901]\d(?!\d))]]></text></define>***** D:\DATETIME.XML<define name="_year" extract="year">        <text><![CDATA[(20\d\d|19\d\d|[9012]\d(?!\d))]]></text></define>********** datetime.xml<define name="_masheddate" extract="year, month, day">        <text><![CDATA[(?:^|source::).*?(?<!\d|\d\.|-)(?:20)?([901]\d)(0\d|1[012])([012]\d|3[01])(?!\d|-| {2,})]]></text></define>***** D:\DATETIME.XML<define name="_masheddate" extract="year, month, day">        <text><![CDATA[(?:^|source::).*?(?<!\d|\d\.|-)(?:20)?([9012]\d)(0\d|1[012])([012]\d|3[01])(?!\d|-| {2,})]]></text></define>********** datetime.xml<define name="_masheddate2" extract="month, day, year">        <text><![CDATA[(?:^|source::).*?(?<!\d|\d\.)(0\d|1[012])([012]\d|3[01])(?:20)?([901]\d)(?!\d| {2,})]]></text></define>***** D:\DATETIME.XML<define name="_masheddate2" extract="month, day, year">        <text><![CDATA[(?:^|source::).*?(?<!\d|\d\.)(0\d|1[012])([012]\d|3[01])(?:20)?([9012]\d)(?!\d| {2,})]]></text></define>********** datetime.xml<define name="_utcepoch" extract="utcepoch, subsecond">        <!-- update regex before '2017' -->        <text><![CDATA[((?<=^|[\s#,"=\(\[\|\{])(?:1[012345]|9)\d{8}|^@[\da-fA-F]{16,24})(?:\.?(\d{1,6}))?(?![\d\(])]]></text></define>***** D:\DATETIME.XML<define name="_utcepoch" extract="utcepoch, subsecond">        <!-- update regex before '2023' -->        <text><![CDATA[((?<=^|[\s#,"=\(\[\|\{])(?:1[0123456]|9)\d{8}|^@[\da-fA-F]{16,24})(?:\.?(\d{1,6}))?(?![\d\(])]]></text></define>*****

结论 (Conclusions)

Luckily, Splunk have a strong bug fix programme, and hopefully things will all be patched in good time, otherwise, planes could fall out of the sky, as Splunk is used in some many industries now. BTW, we love using Splunk for Big Data analysis, and here’s a tutorial:

幸运的是,Splunk具有强大的错误修复程序,希望一切都可以在适当的时间修补,否则,飞机可能会掉下来,因为Splunk现在已在许多行业中使用。 顺便说一句,我们喜欢使用Splunk进行大数据分析,这是一个教程:

If you want a login, just ask.

如果要登录,请询问。

翻译自: https://medium.com/asecuritysite-when-bob-met-alice/devs-and-time-clock-rollovers-c83d6d662088

时钟翻转事件


http://www.taodudu.cc/news/show-6696107.html

相关文章:

  • 从千年虫,闰年虫,闰秒虫看测试数据设计
  • 时间管理在计算机世界中的重要性:从千年虫到现在的日期处理
  • 软件缺陷事件
  • 遭遇2038千年虫
  • 坐实!马蜂窝将裁员10%,多部门或面临解散
  • python利用selenium爬取X蜂窝热门游记
  • 【马蜂窝 加速乐cookie】一次坑爹的获取html源代码不到之路
  • 马蜂窝推荐排序算法模型是如何实现快速迭代的
  • 捅马蜂窝啦!!!
  • Android高仿马蜂窝Tabbar波浪线
  • NO.31——Python爬虫分析马蜂窝十一假期城市旅游数据
  • Webmagic 爬虫框架 爬取马蜂窝、携程旅游、汽车之家游记信息
  • 集合导题、刷题、考试全套完整流程,专业强大的功能,提高刷题学习效率和企业的培训效率
  • leetcode 百题大战
  • Numpy百题斩(一)
  • 力扣百题斩—— 排序篇(一)
  • 考研刷题小程序云开发实战-搭建答题页、结果页、答题记录页
  • numpy百题斩(二)
  • # 算法百题斩其一: floodfill
  • 【JS逆向百题斩】百度翻译接口逆向
  • 关于LRZ的备战计划-百题斩
  • 预备-刷题记录二
  • 【夜曲编程Python数据分析】百题斩最后一题!!
  • Pandas百题斩
  • Java百题大战
  • 刷题记录˃ʍ˂
  • 数字IC手撕代码---百题斩
  • 美颜sdk的美白、贴纸、磨皮功能的实现流程
  • 人像磨皮美颜sdk是什么?磨皮技术详解
  • python chain.from_iterable()

时钟翻转事件_开发人员和时钟翻转相关推荐

  1. 任天堂游戏开发引擎_开发人员如何编程旧任天堂游戏使其平滑滚动

    任天堂游戏开发引擎 Here are three links worth your time: 这是三个值得您花费时间的链接: How developers programmed old Ninten ...

  2. mysql中groupby会用到索引吗_开发人员不得不知的MySQL索引和查询优化

    本文主要总结了工作中一些常用的操作及不合理的操作,在对慢查询进行优化时收集的一些有用的资料和信息,本文适合有 MySQL 基础的开发人员. 索引相关 索引基数 基数是数据列所包含的不同值的数量,例如, ...

  3. ios开发语言本地国际化_开发人员软件本地化最终语言指南

    ios开发语言本地国际化 There are lots of great guides out there for how to prep your product for international ...

  4. ifttt 编程开发_开发人员的5种IFTTT替代品

    ifttt 编程开发 就其本身而言,应用程序或网站只能做很多事情. 当它与其他服务一起工作时,它才真正强大. IFTTT(适用于"如果这样就那么做")将多个网站和服务整合到大多数人 ...

  5. 有趣的java 开发_开发人员历史中的五个有趣时刻

    有趣的java 开发 我在整个开发环境中工作了30多年. 我开始共享一个实际上有门的办公室. 是的,那是很久以前了. 我从办公室到立方体再到开放空间. 我曾在大型团队,小型团队和许多中型团队中工作. ...

  6. ui设计师与开发人员的沟通_开发人员和设计师的27种免费资源

    ui设计师与开发人员的沟通 Design is the face of your product, service or content, without good designs, even if ...

  7. slack 使用说明_开发人员应使用的7个Slack集成

    slack 使用说明 如何使用集成和机器人自定义Slack来增强您的开发工作流程 毫无疑问,Slack正在逐渐成为现代办公通信的标准. 尽管您可能会说Slack从技术上讲与IRC没什么不同,但是精湛的 ...

  8. 前端开发时间格式的转换方法_开发人员投资时间而不浪费时间的10种方法

    前端开发时间格式的转换方法 In today's, in the past and probably in the future world - the time is more valuable t ...

  9. 运动基元_开发人员的新分布式基元

    运动基元 面向对象的基元(进程内基元) 作为Java开发人员,我非常熟悉面向对象的概念,例如类,对象,继承,封装,多态性等.除了面向对象的概念之外,我还非常熟悉Java运行时.它提供的功能,如何调整它 ...

最新文章

  1. 怎么在vs2010中使用ActiveX Test Container(转)
  2. 齐博cms 7.0 漏洞分析
  3. 英特尔的指令集体系结构_对标英特尔的RISC-V大有可为,CPU三分天下格局可期
  4. 【PHP7源码分析】PHP7到底有多快,基准测试与特性分析告诉你
  5. 实战项目四:爬取911网站
  6. matlab simulink笔记05 —— 积分模块
  7. 计算机硬件操作系统应用软件之间的关系,操作系统是其他应用软件运行的基础,什么是操作系统...
  8. 解读金融高频交易不出错的金手指:分布式事务管理
  9. install java 8_Install Java 8 on Ubuntu
  10. java计算两列数据差_DAX计算列基于其他表中的两列
  11. java读写文件操作
  12. webserver入门
  13. python代码-20个Python代码段,你需要立刻学会,好用到哭!
  14. 开始使用 TypeScript
  15. spring session过期时间设置
  16. 【路由器】Breed 介绍、刷入和使用
  17. epoll文件服务器,使用epoll模型的服务器
  18. 世界第4疯狂的科学家,在103岁生日那天去世了
  19. 20211003:数字滤波器前置知识,sinc函数与Sa函数
  20. 通过putty取linux文件,putty对Linux上传下载文件或文件夹

热门文章

  1. so库工具及lib.so 、lib.so.1、 lib.so.1.07三者的联系
  2. 薛蛮子担任顾问的新项目,去中心化数据交易平台XChain
  3. 数据可视化Day1:Matplotlib初相识
  4. sketchup使用教程_什么是Sketchup(以及如何使用它)?
  5. 强哥说Java--Java的抽象类,Java开发前景怎么样
  6. 恒压供水一对一变频一拖三三台变频器ABB 恒压供水一对一变频 一拖三
  7. 学历太低,可以学这5个技术,不但好找工作,工资也挺高的
  8. UE 项目编译超时问题解决
  9. 2023年南京大学水文学及水资源考研成功上岸经验分享
  10. 【taichi】关于SPH_Taichi的探索与尝试