Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 480fc03

Browse files
first commit
1 parent 257a57d commit 480fc03

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
##Ϊjô�������������������1927�꣩��õ�һ����ֵĽ����
2+
3+
###����
4+
�ҳ�����������ij��򣬰��������һ��ı�ʾ���ڵ��ַ���ת��Ϊ�벢�Ƚ����ǣ�
5+
```java
6+
public static void main(String[] args) throws ParseException {
7+
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
8+
String str3 = "1927年12月31日 23:54:07";
9+
String str4 = "1927年12月31日 23:54:08";
10+
Date sDt3 = sf.parse(str3);
11+
Date sDt4 = sf.parse(str4);
12+
long ld3 = sDt3.getTime() /1000;
13+
long ld4 = sDt4.getTime() /1000;
14+
System.out.println(ld4-ld3);
15+
}
16+
```
17+
����ǣ�
18+
353
19+
20+
Ϊjô ld4-ld3 ������1������Ϊ������ɦ��ֻ��һ��ļ��������353��
21+
����Ҹı����������ڵ�һ���
22+
```java
23+
String str3 = "1927年12月31日 23:54:08";
24+
String str4 = "1927年12月31日 23:54:09";
25+
```
26+
ld4-ld3 �͵���1�l�
27+
28+
java�汾��
29+
java version "1.6.0_22"
30+
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
31+
Dynamic Code Evolution Client VM (build 0.2-b02-internal, 19.0-b04-internal, mixed mode)
32+
33+
ɦ��(TimeZone.getDefault()):
34+
sun.util.calendar.ZoneInfo[id="Asia/Shanghai",
35+
offset=28800000,dstSavings=0,
36+
useDaylight=false,
37+
transitions=19,
38+
lastRule=null]
39+
40+
Locale(Locale.getDefault()): zh_CN
41+
42+
###�ش�
43+
���Ǹ�ɦ���ı����ⷢ����12��31�ŵ��Ϻ�
44+
�����ҳ��鿴����1927���Ϻ������飨http://www.timeanddate.com/time/change/china/shanghai?year=1927������ɻ��1927�����һ�����ҹ���ӵ�����5����52�롣���ԡ�1927年12月31日 23��54��08��ɻ���Ϸ��������Σ�ò��java�����˺���һ�ε�ɦ�����������Ի��в���
45+
46+
��ֻ�ǹ���ɦ������һ������������IJ���
47+
48+
�༭������ֹͣ��ť����w�ı���...
49+
50+
������������TZDB��https://github.com/nodatime/nodatime/blob/master/src/NodaTime.Demo/StackOverflowExamples.cs#L68��2013a�İ汾ȥ���1���������ֲ�ͬ�Ľ������2013a�汾�н������358�룬ɦ��23:54:08������23:54:03
51+
52+
���ڶ�Noda Time���е�Ԫ���Ե�ɦ��ע�⵽������⣬��������Ѿ��ı��x���������ʾ�˼�ʹ����w����Ҳ���Ǿ�����ȷ�ġ�
53+
54+
�༭����w�ٴθı���...
55+
56+
��TZDB2014f��ɦ��ı仯�ƶ�����1900年12月31日�����ֻ��343��ĸı䣨�������t��t+1�ļ����344�룬����������ҵ���˼�Ļ���
57+
58+
�༭��Ҫ�ش�Ken Kin�Ĺ���1900��ɦ��ı������...������javaֱ�Ӱ����е�ɦ���򵥵Ķ�����1900Utc֮ǰ�ı�׼ɦ��

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /