code: private static long javaToDosTime(long time) {
          Date d = new Date(time);
          int year = d.getYear() + 1900;
          if (year < 1980) {
              return (1 << 21) | (1 << 16);
          }
          return (year - 1980) << 25 | (d.getMonth() + 1) << 21 |
                 d.getDate() << 16 | d.getHours() << 11 | d.getMinutes() << 5 |
                 d.getSeconds() >> 1;
      }
docs: /*
  Converts Java time to DOS time.