Setting the System Time.

Discussion in 'Java' started by Ken Adams, Feb 25, 2005.

  1. Ken Adams

    Ken Adams Guest

    How do you go about setting your systems time from within a java app? I
    found tonnes of documentation on getting the time, but surely there must be
    a way to set it as well.

    Thanks

    Ken A
    Ken Adams, Feb 25, 2005
    #1
    1. Advertising

  2. Ken Adams

    Rhino Guest

    "Ken Adams" <> wrote in message
    news:Z5LTd.6437$TB.5474@edtnps84...
    > How do you go about setting your systems time from within a java app? I
    > found tonnes of documentation on getting the time, but surely there must

    be
    > a way to set it as well.
    >
    > Thanks
    >
    > Ken A
    >

    If I'm not mistaken, Java (or the JVM) gets the system time from your
    operating system. If you set the clock with your standard OS facilities,
    like the GUI in Windows, you should be able to set the clock to whatever
    time you want.

    Or are you determined to set the clock with Java? I'm not certain but I
    don't think you can do that. Unless perhaps you use Runtime.exec() to
    simulate setting the clock via the operating system.....

    Rhino
    Rhino, Feb 25, 2005
    #2
    1. Advertising

  3. Ken Adams

    Alun Harford Guest

    "Ken Adams" <> wrote in message
    news:Z5LTd.6437$TB.5474@edtnps84...
    > How do you go about setting your systems time from within a java app? I
    > found tonnes of documentation on getting the time, but surely there must

    be
    > a way to set it as well.


    Native method.

    Alun Harford
    Alun Harford, Feb 25, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lawrance
    Replies:
    0
    Views:
    456
    Lawrance
    Nov 30, 2003
  2. Srinivasa Raghavan Sethuraman
    Replies:
    0
    Views:
    556
    Srinivasa Raghavan Sethuraman
    Jun 30, 2004
  3. Ivan Bout

    Setting the system time

    Ivan Bout, Jul 18, 2005, in forum: Java
    Replies:
    4
    Views:
    428
    IchBin
    Jul 18, 2005
  4. flamesrock
    Replies:
    8
    Views:
    449
    Hendrik van Rooyen
    Nov 24, 2006
  5. Tzury

    Setting System Date And Time

    Tzury, Mar 13, 2007, in forum: Python
    Replies:
    0
    Views:
    289
    Tzury
    Mar 13, 2007
Loading...

Share This Page