vb.net - DateTime 是否包含第二次闰功能?
问题描述
在本文中:.Net 的 DateTime 方法是否能够识别闰秒?,作者得到答案“它(日期时间)不包括可归因于闰秒的滴答数。”
但是,以下代码显示 .Net DateTime 支持闰秒。哪位专家能解释一下为什么?
Dim GPS_Time_Base_Point As DateTime = New DateTime(1980, 1, 6, 0, 0, 0, DateTimeKind.Unspecified)
Dim A_test_time As DateTime = New DateTime(2019, 4, 16, 18, 29, 0, DateTimeKind.Unspecified)
Dim TimeSpan As TimeSpan = A_test_time - GPS_Time_Base_Point
Dim GPS_Time_At_LIGO_for_2019_4_16_18_29_0 As UInt64 = 1239474558 'https://www.andrews.edu/~tzs/timeconv/timeconvert.php
Dim DifSeconds As Integer = TimeSpan.TotalSeconds - 1239474558
Debug.Print(" Second dif:" + CDbl(DifSeconds).ToString)
输出为“Second dif:-18”,它等于 gpstime - UTC 时间的闰秒差异。
解决方案
推荐阅读
- file - 如何正确地将链 ID 添加到我的 pdb 文件中?
- tensorflow - tf.test.is_gpu_available() 在子进程中为 False,但在主进程中为 True
- flutter - Flutter:集成 Flutter_map
- amazon-web-services - AWS - 通过 Lambda 读取 SQS 消息
- angular - Docker /docker-entrypoint.sh:32:exec:yarn:运行docker容器(Angular)时找不到
- python - Altair - 绘制自定义颜色
- javascript - Python Selenium 错误开始出现
- apache - Varnish x Apache CDN 和 HTTPs
- python-2.7 - 使用 python 从 AWS EC2 读取/写入存储在 AWS S3 中的 Shapefiles .shp
- java - Java Spring Boot 登录和角色问题