本文整理匯總了Java中org.apache.pig.piggybank.evaluation.datetime.convert.ISOToUnix類的典型用法代碼示例。如果您正苦於以下問題:Java ISOToUnix類的具體用法?Java ISOToUnix怎麽用?Java ISOToUnix使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ISOToUnix類屬於org.apache.pig.piggybank.evaluation.datetime.convert包,在下文中一共展示了ISOToUnix類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testISOToUnix
import org.apache.pig.piggybank.evaluation.datetime.convert.ISOToUnix; //導入依賴的package包/類
@Test
public void testISOToUnix() throws Exception {
// Verify that ISO string datetimes convert to Unix (long) datetimes
Tuple t2 = TupleFactory.getInstance().newTuple(1);
t2.set(0, "2009-01-07T01:07:01.000Z");
ISOToUnix func2 = new ISOToUnix();
Long unix = func2.exec(t2);
assertTrue(unix == 1231290421000L);
}
示例2: testISOToUnix
import org.apache.pig.piggybank.evaluation.datetime.convert.ISOToUnix; //導入依賴的package包/類
@Test
public void testISOToUnix() throws Exception {
// Verify that ISO string datetimes convert to Unix (long) datetimes
Tuple t2 = TupleFactory.getInstance().newTuple(1);
t2.set(0, "2009-01-07T01:07:01.000Z");
ISOToUnix func2 = new ISOToUnix();
Long unix = func2.exec(t2);
assertTrue(unix == 1231290421000L);
assertEquals("Should not change the default timezone", defaultDTZ, DateTimeZone.getDefault());
}