robotframework-2.7.7.atest.testdata.test_libraries.JavaLibUsingTimestamps Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of robotframework Show documentation
Show all versions of robotframework Show documentation
High level test automation framework
The newest version!
import java.util.GregorianCalendar;
public class JavaLibUsingTimestamps {
public void javaTimestamp() throws InterruptedException {
long timestamp = 1308419034931L;
GregorianCalendar calendar = new GregorianCalendar();
calendar.setTimeInMillis(timestamp);
timestamp += 10800000 - calendar.getTimeZone().getOffset(calendar.getTimeInMillis());
System.out.println("*INFO:" + timestamp +"* Known timestamp");
System.out.println("*HTML:" +
System.currentTimeMillis() +
"*Current");
Thread.sleep(100);
}
}