Java Utililty Methods Unix time

List of utility methods to do Unix time

Description

The list of methods to do Unix time are organized into topic(s).

Method

StringunixTimeToString(int time)
Helper for CAST({timestamp} AS VARCHAR(n)).
final StringBuilder buf = new StringBuilder(8);
unixTimeToString(buf, time);
return buf.toString();
StringunixTimeToString(int time, int precision)
unix Time To String
final StringBuilder buf = new StringBuilder(8);
unixTimeToString(buf, time, precision);
return buf.toString();
doubleunixToGST(double unix)
unix To GST
double jd = UnixToJulianDays(unix);
double t = (jd - 2451545.0) / 36525.0 + 0.0005;
double gst = 280.46061837 + 360.98564736629 * (jd - 2451545.0) + t * t * (0.000387933 - t / 38710000.0);
while (gst >= 360) {
    gst -= 360;
while (gst <= 0) {
    gst += 360;
...
doubleUnixToJulianDays(double unix)
Unix To Julian Days
return unix / 86400.0 + 2440587.5;