[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kvm-interest
Subject:    Workaround for long bug and time
From:       Bernd Wiegmann <BerndWSE () GMX ! DE>
Date:       1999-11-30 9:25:29
[Download RAW message or body]

Hello!

For the long bug in KVM I found a workaround that works for about 23 days.
Here is the code I used:

  public int getNow() {
    long nowl_offset = 943482420000L;
    int  nowi_offset = 43482420;
    long now = System.currentTimeMillis();
    int  rc;

    now -= nowl_offset;
    rc = (int)now;
    rc /= 1000;
    rc += nowi_offset;

    return rc;
  }

The value nowl_offset is the output from a small java program that runs on
my desktop and it is the current time a few days ago. 23 days after this
time the resulting value gets to big to be converted to an int. I hope SUN
will fix this bug fast enuogh that we don't have to change these values too
often.

If you use this code to write al class that converts the time into a
formated String, please mail it to me in return.

Regards, Bernd

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic