由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - json, js, mysql的date format全不一样
相关主题
register variableC++ Q01: private inheritance.
default Specifier是什么?operator overloading (C++)
怎样在LINUX下C++程序里延迟1msC++ Q93 - Q95 (转载)
difference between: char** p and char*p[] ??C++ Q90 - Q92 (转载)
Any difference between class and typename identifier?c++ 语法
ms cl.exe 的选项VC++: Module-Definition (.def) Files:
C++里面 class的数据成员的顺序是什么样的?C/C++ __int64和long long, cross platform问题
what is the difference?请教template和factory有啥区别?
相关话题的讨论汇总
话题: date话题: systems话题: iso话题: 8601话题: day
进入Programming版参与讨论
1 (共1页)
s*****w
发帖数: 1527
1
尼玛的,需要变来变去
m******r
发帖数: 1033
2
这是搞数据的基本功, 很复杂,得多看文档。 不能光自己试。
s*i
发帖数: 5025
3
the real fun begins when you have to handle timezone

【在 s*****w 的大作中提到】
: 尼玛的,需要变来变去
m******r
发帖数: 1033
4
其实这也是我想说的,要想知道有多复杂, 可以参考下R的文档:
timezones {base}
不过如果就是简单用用,半天也就上手了。

【在 s*i 的大作中提到】
: the real fun begins when you have to handle timezone
w***g
发帖数: 5958
5
这都是小问题。哥最近碰到个算法题,完全没思路。感觉天天在写bug。
只要耐心就能写出来的问题都是神的恩赐。

【在 s*****w 的大作中提到】
: 尼玛的,需要变来变去
c********1
发帖数: 5269
6
[date format]有点繁琐,但属最简单的问题
r****t
发帖数: 10904
7
试试看扔各大论坛上,高人们分分钟给你众筹一个算法出来。

【在 w***g 的大作中提到】
: 这都是小问题。哥最近碰到个算法题,完全没思路。感觉天天在写bug。
: 只要耐心就能写出来的问题都是神的恩赐。

r****t
发帖数: 10904
8
SO 上面也可以问

【在 r****t 的大作中提到】
: 试试看扔各大论坛上,高人们分分钟给你众筹一个算法出来。
s*****w
发帖数: 1527
9
我的意思是,为啥没有统一的标准格式?

【在 c********1 的大作中提到】
: [date format]有点繁琐,但属最简单的问题
s*****w
发帖数: 1527
10
这是啥网站?

【在 r****t 的大作中提到】
: SO 上面也可以问
相关主题
C++里面 class的数据成员的顺序是什么样的?operator overloading (C++)
what is the difference?C++ Q93 - Q95 (转载)
C++ Q01: private inheritance.C++ Q90 - Q92 (转载)
进入Programming版参与讨论
c********1
发帖数: 5269
11
可自己统一为
yyyy:mm:dd hh:mm:ss:ms

【在 s*****w 的大作中提到】
: 我的意思是,为啥没有统一的标准格式?
m******r
发帖数: 1033
12
凭啥要有统一标准? 时间起点是1970 年还是1900年 还是0000年? 起点设为1,还是
设为零? 计数按天算,还是按秒算 ? hadoop按毫秒算。
贴一段R文档
Conversion from other Systems
Most systems record dates internally as the number of days since some origin
, but this is fraught with problems, including
Is the origin day 0 or day 1? As the ‘Examples’ show, Excel manages to use
both choices for its two date systems.
If the origin is far enough back, the designers may show their ignorance of
calendar systems. For example, Excel's designer thought 1900 was a leap year
(claiming to copy the error from earlier DOS spreadsheets), and Matlab's
designer chose the non-existent date of ‘January 0, 0000’ (there is no
such day), not specifying the calendar. (There is such a year in the ‘
Gregorian’ calendar as used in ISO 8601:2004, but that does say that it is
only to be used for years before 1582 with the agreement of the parties in
information exchange.)
The only safe procedure is to check the other systems values for known dates
Note
The default formats follow the rules of the ISO 8601 international standard
which expresses a day as "2001-02-03".
If the date string does not specify the date completely, the returned answer
may be system-specific. The most common behaviour is to assume that a
missing year, month or day is the current one. If it specifies a date
incorrectly, reliable implementations will give an error and the date is
reported as NA. Unfortunately some common implementations (such as glibc)
are unreliable and guess at the intended meaning.
Years before 1CE (aka 1AD) will probably not be handled correctly.
References
International Organization for Standardization (2004, 1988, 1997, ...) ISO
8601. Data elements and interchange formats – Information interchange –
Representation of dates and times. For links to versions available on-line
see (at the time of writing) http://www.qsl.net/g1smd/isopdf.htm.
c****d
发帖数: 116
13
stackoverflow.com

【在 s*****w 的大作中提到】
: 这是啥网站?
f*******t
发帖数: 7549
14
尤其是带夏令时之类的时区,那滋味真酸爽

【在 s*i 的大作中提到】
: the real fun begins when you have to handle timezone
T********i
发帖数: 2416
15
历史上夏令时规矩一直变。玩过历史时间夏令时自动转换么?C++。
自己Build的嵌入式Linux。手机端自动检测配置服务器时区。。。
这个还找不到有人做过的文献。。。

【在 f*******t 的大作中提到】
: 尤其是带夏令时之类的时区,那滋味真酸爽
m******r
发帖数: 1033
16
上知天文下知地理
1 (共1页)
进入Programming版参与讨论
相关主题
an excel questionAny difference between class and typename identifier?
再来问个蠢问题ms cl.exe 的选项
help on wrapC++里面 class的数据成员的顺序是什么样的?
Python矩阵一问what is the difference?
register variableC++ Q01: private inheritance.
default Specifier是什么?operator overloading (C++)
怎样在LINUX下C++程序里延迟1msC++ Q93 - Q95 (转载)
difference between: char** p and char*p[] ??C++ Q90 - Q92 (转载)
相关话题的讨论汇总
话题: date话题: systems话题: iso话题: 8601话题: day