All Downloads are FREE. Search and download functionalities are using the official Maven repository.

robotframework-2.7.7.atest.testdata.test_libraries.JavaLibUsingTimestamps Maven / Gradle / Ivy

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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy