Page 1 of 4 1234 LastLast
Results 1 to 10 of 34

Thread: Your computer clock maybe wrong......

  1. #1
    enoughfakefiles's Avatar Ad ministrator
    Join Date
    Jun 2003
    Location
    I'm an Even Steven with a
    Posts
    7,568
    Mines definatly well out if this is true.




  2. Lounge   -   #2
    Mathea's Avatar The Blonde Alibi BT Rep: +5
    Join Date
    Feb 2004
    Location
    NY
    Age
    42
    Posts
    5,869
    mine is always wrong

    i fix it n then within 24 hours its wrong again so i finally gave up

  3. Lounge   -   #3
    bigboab's Avatar Poster BT Rep: +1
    Join Date
    Jul 2003
    Posts
    29,621
    Quote Originally Posted by JPaul
    Mine is feckin accurate. It synchronizes with one of those atomic chaps.
    Dont you mean atomic chips. Or is that fission chips.
    Last edited by bigboab; 11-30-2004 at 08:53 PM.
    The best way to keep a secret:- Tell everyone not to tell anyone.

  4. Lounge   -   #4
    TheDave's Avatar n00b
    Join Date
    Apr 2003
    Location
    yorkshire, england
    Age
    38
    Posts
    6,726
    i think mine synchronises when it reports my porn to microsoft

  5. Lounge   -   #5
    TheDave's Avatar n00b
    Join Date
    Apr 2003
    Location
    yorkshire, england
    Age
    38
    Posts
    6,726


    yep it does

  6. Lounge   -   #6
    enoughfakefiles's Avatar Ad ministrator
    Join Date
    Jun 2003
    Location
    I'm an Even Steven with a
    Posts
    7,568
    Quote Originally Posted by TheDave


    yep it does
    Windows 2000 doesn`t have that option.

  7. Lounge   -   #7
    TheDave's Avatar n00b
    Join Date
    Apr 2003
    Location
    yorkshire, england
    Age
    38
    Posts
    6,726
    fyi its 21:20:42

  8. Lounge   -   #8
    Code:
    import java.net.*;
    import java.io.*;
    import java.util.*;
    
    class Time
    {
       /* Network time is seconds from 1 Jan 1900
       *  Java time is milliseconds from 1 Jan 1970
       *  DIFFERENCE is number of seconds between these dates
       */
       static long DIFFERENCE = 2208988800L;
       
       public static void main (String [] args ) throws IOException
       {
          int b1,b2,b3,b4;
          long remoteTime;
    
          Socket sock = new Socket("time.nist.gov",37);
          InputStream in = sock.getInputStream();
    
          // read and pack four bytes
          b1 = in.read();
          b2 = in.read();
          b3 = in.read();
          b4 = in.read();
    
          remoteTime = (((long)b1*256 + b2)*256 + b3)*256 + b4;
          remoteTime -= DIFFERENCE;  
          sock.close();
    
          Date remoteDate = new Date(remoteTime*1000); // convert to milliseconds      
          System.out.println("Remote time: "+remoteDate);
          Date localTime = new Date();
          System.out.println("Local time: "+localTime);
       }
    }
    Last edited by Tifosi; 11-30-2004 at 09:16 PM.

  9. Lounge   -   #9
    TheDave's Avatar n00b
    Join Date
    Apr 2003
    Location
    yorkshire, england
    Age
    38
    Posts
    6,726
    that a java thing that syncs time for win 2000?

  10. Lounge   -   #10
    Quote Originally Posted by TheDave
    that a java thing that syncs time for win 2000?
    It doesn't sync the time, just displays the remote time from the time server and then your own local system time, allowing you to see the difference.

Page 1 of 4 1234 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •