Thread: Date and time in console

Results 1 to 10 of 10
  1. #1 Date and time in console 
    Registered Member
    Shoutbox's Avatar
    Join Date
    Sep 2013
    Posts
    1,748
    Thanks given
    580
    Thanks received
    363
    Rep Power
    834
    Ive never come across this. Could someone tell me how to delete it out of the console?

    Screenshot by Lightshot

    Thanks,
    Imperfection
    S A D B O Y S

    私は自分自身を殺すために待つことができない
    Reply With Quote  
     

  2. #2  
    Registered Member Joseph69's Avatar
    Join Date
    Sep 2012
    Posts
    293
    Thanks given
    45
    Thanks received
    20
    Rep Power
    56
    Playerassistant.java

    Code:
    public String checkTimeOfDay() {
    		Calendar cal = new GregorianCalendar();
    		int TIME_OF_DAY = cal.get(Calendar.AM_PM);
    		if (TIME_OF_DAY > 0)
    			return "PM";
    		else
    			return "AM";
    	}
    Code:
    public void checkDateAndTime() {
    		Calendar cal = new GregorianCalendar();
    
    		int YEAR = cal.get(Calendar.YEAR);
    		int MONTH = cal.get(Calendar.MONTH) + 1;
    		int DAY = cal.get(Calendar.DAY_OF_MONTH);
    		int HOUR = cal.get(Calendar.HOUR_OF_DAY);
    		int MIN = cal.get(Calendar.MINUTE);
    		int SECOND = cal.get(Calendar.SECOND);
    
    		String day = "";
    		String month = "";
    		String hour = "";
    		String minute = "";
    		String second = "";
    
    		if (DAY < 10)
    			day = "0" + DAY;
    		else
    			day = "" + DAY;
    		if (MONTH < 10)
    			month = "0" + MONTH;
    		else
    			month = "" + MONTH;
    		if (HOUR < 10)
    			hour = "0" + HOUR;
    		else
    			hour = "" + HOUR;
    		if (MIN < 10)
    			minute = "0" + MIN;
    		else
    			minute = "" + MIN;
    		if (SECOND < 10)
    			second = "0" + SECOND;
    		else
    			second = "" + SECOND;
    
    		c.date = day + "/" + month + "/" + YEAR;
    		c.currentTime = hour + ":" + minute + ":" + second;
    	}
    Reply With Quote  
     

  3. #3  
    Registered Member
    Shoutbox's Avatar
    Join Date
    Sep 2013
    Posts
    1,748
    Thanks given
    580
    Thanks received
    363
    Rep Power
    834
    Quote Originally Posted by Joseph69 View Post
    Playerassistant.java

    Code:
    public String checkTimeOfDay() {
    		Calendar cal = new GregorianCalendar();
    		int TIME_OF_DAY = cal.get(Calendar.AM_PM);
    		if (TIME_OF_DAY > 0)
    			return "PM";
    		else
    			return "AM";
    	}
    Code:
    public void checkDateAndTime() {
    		Calendar cal = new GregorianCalendar();
    
    		int YEAR = cal.get(Calendar.YEAR);
    		int MONTH = cal.get(Calendar.MONTH) + 1;
    		int DAY = cal.get(Calendar.DAY_OF_MONTH);
    		int HOUR = cal.get(Calendar.HOUR_OF_DAY);
    		int MIN = cal.get(Calendar.MINUTE);
    		int SECOND = cal.get(Calendar.SECOND);
    
    		String day = "";
    		String month = "";
    		String hour = "";
    		String minute = "";
    		String second = "";
    
    		if (DAY < 10)
    			day = "0" + DAY;
    		else
    			day = "" + DAY;
    		if (MONTH < 10)
    			month = "0" + MONTH;
    		else
    			month = "" + MONTH;
    		if (HOUR < 10)
    			hour = "0" + HOUR;
    		else
    			hour = "" + HOUR;
    		if (MIN < 10)
    			minute = "0" + MIN;
    		else
    			minute = "" + MIN;
    		if (SECOND < 10)
    			second = "0" + SECOND;
    		else
    			second = "" + SECOND;
    
    		c.date = day + "/" + month + "/" + YEAR;
    		c.currentTime = hour + ":" + minute + ":" + second;
    	}
    Thankful for the help but i cant find any of that.
    S A D B O Y S

    私は自分自身を殺すために待つことができない
    Reply With Quote  
     

  4. #4  
    Registered Member Joseph69's Avatar
    Join Date
    Sep 2012
    Posts
    293
    Thanks given
    45
    Thanks received
    20
    Rep Power
    56
    Quote Originally Posted by Imperfection View Post
    Thankful for the help but i cant find any of that.
    Did you try and search it throughout your whole source folder nor just the playerassistant?
    Reply With Quote  
     

  5. #5  
    Registered Member
    Shoutbox's Avatar
    Join Date
    Sep 2013
    Posts
    1,748
    Thanks given
    580
    Thanks received
    363
    Rep Power
    834
    Quote Originally Posted by Joseph69 View Post
    Did you try and search it throughout your whole source folder nor just the playerassistant?
    Whole source sir.
    S A D B O Y S

    私は自分自身を殺すために待つことができない
    Reply With Quote  
     

  6. #6  
    Respected Member


    Join Date
    Jan 2009
    Posts
    5,743
    Thanks given
    1,162
    Thanks received
    3,603
    Rep Power
    5000
    It is a custom PrintStream it will be set using

    Code:
    System.setOut
    Find where that is being called in your source and delete / comment it out.
    Reply With Quote  
     

  7. Thankful users:


  8. #7  
    Registered Member Joseph69's Avatar
    Join Date
    Sep 2012
    Posts
    293
    Thanks given
    45
    Thanks received
    20
    Rep Power
    56
    Thank you Stuart, I did not know that.

    Code:
    public static void main(java.lang.String args[])
    			throws NullPointerException, IOException {
    		System.setOut(new Logger(System.out));
    		System.setErr(new Logger(System.err));
    		System.out.println("Initializing the server...");
    		World.getWorld();
    		try {
    			new RS2Server().start();
    		} catch (Exception ex) {
    			System.out.println("Error starting the server...");
    			ex.printStackTrace();
    			System.exit(1);
    		}
    		System.gc();
    	}
    Reply With Quote  
     

  9. #8  
    Registered Member
    Shoutbox's Avatar
    Join Date
    Sep 2013
    Posts
    1,748
    Thanks given
    580
    Thanks received
    363
    Rep Power
    834
    Quote Originally Posted by _Stuart View Post
    It is a custom PrintStream it will be set using

    Code:
    System.setOut
    Find where that is being called in your source and delete / comment it out.
    Thanks Mate, really greatful.

    If i just delete these two lines

    Code:
    		System.setOut(new Logger(System.out));
    		System.setErr(new Logger(System.err));
    I should be fine?
    Thanks once again,
    Imperfection
    S A D B O Y S

    私は自分自身を殺すために待つことができない
    Reply With Quote  
     

  10. #9  
    Registered Member Joseph69's Avatar
    Join Date
    Sep 2012
    Posts
    293
    Thanks given
    45
    Thanks received
    20
    Rep Power
    56
    Quote Originally Posted by Imperfection View Post
    Thanks Mate, really greatful.

    If i just delete these two lines

    Code:
    		System.setOut(new Logger(System.out));
    		System.setErr(new Logger(System.err));
    I should be fine?
    Thanks once again,
    Imperfection
    Well, I think System.err is not really associated with it, did you comment out
    Code:
    System.setOut
    and check if it still displayed the date and time?
    Reply With Quote  
     

  11. #10  
    Registered Member
    Shoutbox's Avatar
    Join Date
    Sep 2013
    Posts
    1,748
    Thanks given
    580
    Thanks received
    363
    Rep Power
    834
    I commented both out it worked :3 Thanks guys
    S A D B O Y S

    私は自分自身を殺すために待つことができない
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [Pi] Date and Time Problem
    By Inclement in forum Help
    Replies: 8
    Last Post: 03-29-2011, 09:31 AM
  2. Replies: 19
    Last Post: 09-26-2009, 08:14 PM
  3. Logging Date and Time (Useful for Chat, PM's etc.)
    By Simbioitic in forum Snippets
    Replies: 6
    Last Post: 04-28-2009, 02:12 PM
  4. Replies: 44
    Last Post: 04-13-2008, 09:46 PM
  5. First time in Photoshop :l
    By I0 Peeka 0I in forum Showcase
    Replies: 16
    Last Post: 12-22-2007, 08:50 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •