Fix time zone issue.

This commit is contained in:
wu-sheng 2017-11-01 17:21:26 +08:00
parent 7d9f0db359
commit 7137b849ca
1 changed files with 13 additions and 0 deletions

View File

@ -18,13 +18,26 @@
package org.skywalking.apm.collector.core.util;
import java.util.TimeZone;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
/**
* @author wu-sheng
*/
public class TimeBucketUtilsTest {
@Before
public void setup() {
TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
}
@After
public void teardown() {
}
@Test
public void testGetInfoFromATimestamp() {
long timeMillis = 1509521745220L;