Unix Timestamp
class Foundation_API DateTime
/// This class represents an instant in time, expressed
/// in years, months, days, hours, minutes, seconds
/// and milliseconds based on the Gregorian calendar.
/// The class is mainly useful for conversions between
/// UTC, Julian day and Gregorian calendar dates.
///
/// The date and time stored in a DateTime is always in UTC
/// (Coordinated Universal Time) and thus independent of the
/// timezone in effect on the system.
///
/// Conversion calculations are based on algorithms
/// collected and described by Peter Baum at
/// http://vsg.cape.com/~pbaum/date/date0.htm
///
/// Internally, this class stores a date/time in two
/// forms (UTC and broken down) for performance reasons. Only use
/// this class for conversions between date/time representations.
/// Use the Timestamp class for everything else.
///
/// Notes:
/// * Zero is a valid year (in accordance with ISO 8601 and astronomical year numbering)
/// * Year zero (0) is a leap year
/// * Negative years (years preceding 1 BC) are not supported
///
/// For more information, please see:
/// * http://en.wikipedia.org/wiki/Gregorian_Calendar
/// * http://en.wikipedia.org/wiki/Julian_day
/// * http://en.wikipedia.org/wiki/UTC
/// * http://en.wikipedia.org/wiki/ISO_8601
Epoch:
指的是一个特定的时间:1970-01-01 00:00:00 UTC。
UNIX时间戳:Unix时间戳(英文为Unix time, POSIX time 或 Unix timestamp)是从Epoch(1970年1月1日00:00:00 UTC)开始所经过的秒数,不考虑闰秒。
时间戳是自 1970 年 1 月 1 日(00:00:00 GMT)以来的秒数。它也被称为 Unix 时间戳(Unix Timestamp)。
Unix时间戳(Unix timestamp),或称Unix时间(Unix time)、POSIX时间(POSIX time),是一种时间表示方式,定义为从格林威治时间1970年01月01日00时00分00秒起至现在的总秒数。Unix时间戳不仅被使用在Unix系统、类Unix系统中,也在许多其他操作系统中被广泛采用。
UTC:
协调世界时(英:Coordinated Universal Time ,法:Temps Universel Coordonné),又称世界统一时间,世界标准时间,国际协调时间。英文(CUT)和法文(TUC)的缩写不同,作为妥协,简称UTC。
/// Monotonic UTC time value in 100 nanosecond resolution,
/// with base time midnight, October 15, 1582.
The Gregorian calendar is internationally the most widely used civil calendar. It is named after Pope Gregory XIII, who introduced it in October 1582.
Julian_day:
一般广泛用于 天文计时
闰年判断:
inline bool DateTime::isLeapYear(int year)
{
return (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0);
}
Unix Timestamp的更多相关文章
- [R语言]R语言计算unix timestamp的坑
R+mongo的组合真是各种坑等着踩 由于mongo中的时间戳普遍使用的是unix timestamp的格式,因此需要对每天的数据进行计算的时候,很容易就想到对timestamp + gap对方式来实 ...
- js 取得 Unix时间戳(Unix timestamp)
js 取得 Unix时间戳 Unix时间戳(Unix timestamp),或称Unix时间(Unix time).POSIX时间(POSIX time),是一种时间表示方式,定义为从格林威治时间19 ...
- 如何在不同编程语言中获取现在的Unix时间戳(Unix timestamp)
Java time JavaScript Math.round(new Date().getTime()/1000)getTime()返回数值的单位是毫秒 Microsoft .NET / C# ep ...
- Unix时间戳(Unix timestamp)转换工具
http://tool.chinaz.com/Tools/unixtime.aspx 现在的Unix时间戳(Unix timestamp)是 1440732364 Unix时间戳( ...
- 如何在不同编程语言中获取现在的Unix时间戳(Unix timestamp)?
Java time JavaScript Math.round(new Date().getTime()/1000) 之所以除以1000是因为getTime()返回数值的单位是毫秒 Microsoft ...
- 在不同编程语言中对Unix时间戳进行转换(Unix timestamp)
最近用到unix时间转换在mysql和.net中的应用.将此资料保存在博客中. 如何在不同编程语言中获取现在的Unix时间戳(Unix timestamp)? Java time JavaScript ...
- [转]js 取得 Unix时间戳(Unix timestamp)
本文转自:https://blog.csdn.net/o0snow/article/details/6858829 js 取得 Unix时间戳 Unix时间戳(Unix timestamp),或称Un ...
- win10 uwp unix timestamp 时间戳 转 DateTime
有时候需要把网络的 unix timestamp 转为 C# 的 DateTime ,在 UWP 可以如何转换? 转换函数可以使用下面的代码 private static DateTime UnixT ...
- 时间戳Unix timestamp
(1)定义 Unix时间戳(Unix timestamp),或称Unix时间(Unix time).POSIX时间(POSIX time),是一种时间表示方式,定义为从格林威治时间1970年01月01 ...
- 【.Net】win10 uwp unix timestamp 时间戳 转 DateTime
有时候需要把网络的 unix timestamp 转为 C# 的 DateTime ,在 UWP 可以如何转换? 转换函数可以使用下面的代码 private static DateTime UnixT ...
随机推荐
- ASP.NET动态网站制作(11)-- JQ(3)
前言:这节课主要是讲CSS作业,然后继续讲jQuery. 内容: 1.css作业讲解. 2.jq设置元素样式: (1)添加.删除css类别:$("div").addClass(& ...
- Continuously Integrate
 Continuously Integrate David Bartlett THE Build AS A "Big BAng" EvEnT in project develop ...
- 利用.dSYM跟.app文件准确定位Crash位置
本文转载至 http://blog.csdn.net/lvxiangan/article/details/28102629 利用.dSYM和.app文件准确定位Crash位置首先,确保 ...
- UVa 10828 Back to Kernighan-Ritchie 高斯消元+概率DP
题目来源:UVa 10828 Back to Kernighan-Ritchie 题意:从1開始 每次等概率从一个点到和他相邻的点 有向 走到不能走停止 求停止时每一个点的期望 思路:写出方程消元 方 ...
- CentOS下配置静态IP
第一.在VMware中进行配置使用桥接的方式.点击编辑选择虚拟网络编辑器 选择桥接模式,选择桥接到外部的网卡.选择我们主机下的网卡 第二步.配置虚拟机使用桥接模式 第三步:启动虚拟机进入到 /etc/ ...
- 学习html第一天
网站本身就是软件,软件:一种具有特定功能的程序指令的集合 C/S:C客户端-->S服务器 由程序员开发 客户去下载升级安装,比如魔兽世界 B/S:B浏览器-->S服务器 由程序员开发 ...
- 让loadrunner走下神坛(全)
作者: sunshinelius(转载请注明作者) Loadrunner无疑是一个强大有力的压力测试工具.它的脚本可以录制生成,自动关联:测试场景可以面向指标,多方监控:测试结果图表显示,拆分组合.相 ...
- Zookeeper原理与Curator使用
近期打算实现一个基于Zookeeper的分布式的集群状态一致性控制, 对Zookeeper的原理不太了解, 正好学习一下, 网上找到了几篇文章, 先贴在这边, 等我熟读官方文档后, 再来补充自己的见解 ...
- Download rtsp.c
1. [代码][C/C++]代码 /* * Copyright (c) 2011, Jim Hollinger * All rights reserved. * * Redistribution an ...
- 假日旅游CSS网页模板
假日旅游CSS3网页模板,蓝色,旅游,假日,公司,设计,主页,HTML,DIV+CSS,模板下载. http://www.huiyi8.com/lvyoumuban/css/