This method returns the status code reflecting whether the leap
seconds are from a external file, defined by an environment variable,
or the leap seconds are based on the hard-coded table in the class.
Example:
// Get the milliseconds to Aug 5, 1990 at 5:00
double ep = Epoch.compute(1990, 8, 5, 5, 0, 0, 0);
//Get the year, month, day, hour, minutes, seconds, milliseconds for ep
long times[] = Epoch.breakdown(ep);
for (int i=0;i<times.length;i++)
System.out.print(times[i]+" ");
System.out.println();
// Printout the epoch in various formats
System.out.println(Epoch.encode(ep));
System.out.println(Epoch.encode1(ep));
System.out.println(Epoch.encode2(ep));
System.out.println(Epoch.encode3(ep));
System.out.println(Epoch.encode4(ep));
// Print out the date using format
String format = ", at :";
System.out.println(Epoch.encodex(ep,format));
Epoch() -
Constructor for class gsfc.nssdc.cdf.util.Epoch
Example:
// Get the time, down to picoseconds, for Aug 5, 1990 at 5:0:0.0.0.0
double[] epoch16 = new double[2];
double ep = Epoch16.compute(1990, 8, 5, 5, 0, 0, 0, 0, 0, 0, epoch16);
//Get the year, month, day, hour, minutes, seconds, milliseconds,
// microseconds, nanaseconds and picoseconds for epoch16
long times[] = Epoch16.breakdown(epoch16);
for (int i=0;i<times.length;i++)
System.out.print(times[i]+" ");
System.out.println();
// Printout the epoch in various formats
System.out.println(Epoch16.encode(epoch16));
System.out.println(Epoch16.encode1(epoch16));
System.out.println(Epoch16.encode2(epoch16));
System.out.println(Epoch16.encode3(epoch16));
System.out.println(Epoch16.encode4(epoch16));
// Print out the date using format
String format = ", at :";
System.out.println(Epoch16.encodex(epoch16,format));
Sets the file backward flag so that when a new CDF file is created,
it will be created in either in the older V2.7 version or the current
library version, i.e., V3.*.