Rob Prime wrote:Use another variable to store the old value, then restore that old value at the end. Or simply use the new variable instead of the old one.
Note that you may need to copy (or clone()) the old value if you intend to modify it. E.g.
Campbell Ritchie wrote:Don't know. I don't think you can use the System.setProperty() method since there doesn't seem to be a property corresponding to current time. Sorry I can't help any more.
Campbell Ritchie wrote:You will get better attention if we know what the question is about.
Do you mean to get the time with methods like System#currentTimeMillis()?
Or would you want a Calendar object? Or one of the DateFormat classes (possibly SimpleDateFormat)?
Alex Hurtt wrote:This?
Rob Prime wrote:How about this: