添加测试文件
This commit is contained in:
parent
3a1b64be9f
commit
f58c85833c
7
pom.xml
7
pom.xml
@ -15,7 +15,6 @@
|
||||
<servlet.version>2.5</servlet.version>
|
||||
<mybatis.version>3.2.7</mybatis.version>
|
||||
<mybatis.spring.version>1.1.1</mybatis.spring.version>
|
||||
<mybatis.paging.version>0.0.1</mybatis.paging.version>
|
||||
<mybatis.generator.core.version>1.3.2</mybatis.generator.core.version>
|
||||
<file_encoding>utf-8</file_encoding>
|
||||
</properties>
|
||||
@ -184,12 +183,6 @@
|
||||
<version>${mybatis.spring.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.loafer</groupId>
|
||||
<artifactId>mybatis-paging</artifactId>
|
||||
<version>${mybatis.paging.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mybatis.generator</groupId>
|
||||
<artifactId>mybatis-generator-core</artifactId>
|
||||
|
36
src/main/java/osc/git/eh3/test/TestCalendar.java
Normal file
36
src/main/java/osc/git/eh3/test/TestCalendar.java
Normal file
@ -0,0 +1,36 @@
|
||||
package osc.git.eh3.test;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.TimeZone;
|
||||
|
||||
/**
|
||||
* Created by lixiangrong on 2016/8/11.
|
||||
*/
|
||||
public class TestCalendar {
|
||||
|
||||
public static void main(String[] args) {
|
||||
long date = 1470844800000l;
|
||||
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT+8"));
|
||||
TimeZone timeZone = calendar.getTimeZone();
|
||||
System.out.println(timeZone);
|
||||
calendar.setTimeInMillis(date);
|
||||
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
Long startDate = calendar.getTimeInMillis();
|
||||
System.out.println(startDate);
|
||||
|
||||
calendar.setTimeInMillis(date);
|
||||
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 23);
|
||||
|
||||
calendar.set(Calendar.MINUTE, 59);
|
||||
|
||||
calendar.set(Calendar.SECOND, 59);
|
||||
Long endDate = calendar.getTimeInMillis();
|
||||
System.out.println(endDate);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user