Open topic with navigation

TIBCO Rendezvous® 8.8.0

# TibrvDate.setTime()

Method

## Declaration

    void setTime(long milliseconds)
    void setTime(
        long  seconds,
        int   nanoseconds)

## Purpose

Change the value of a date object.

## Remarks

If the time value specified is out of range, this constructor throws an `IllegalArgumentException`.

Parameter | Description
`milliseconds` | Set the date from this value (in milliseconds, centered on 12:00am, January 1, 1970).
`seconds` | Set the a date from this value (in seconds, centered on 12:00am, January 1, 1970). This argument must be in the range [TibrvDate.MIN_SECONDS`;`TibrvDate.MAX_SECONDS].
`nanoseconds` | Add this value (in nanoseconds) to the time specified by the `seconds` parameter. This argument must be non-negative, in the range [`0`;`999999999`].

## Method Forms

With one argument, interpret it as the date in milliseconds. For example, specify the time 1/2 second before midnight of December 31, 1969 as -500 milliseconds.

With two arguments, interpret them as seconds and (non-negative) nanoseconds. For example, specify the time 1/2 second before midnight of December 31, 1969 as -1 seconds plus 500,000,000 nanoseconds.

## See Also

Representations

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Rendezvous®

Copyright © 1997-2025. Cloud Software Group, Inc. All Rights Reserved.