- Joined
- Aug 16, 2006
- Messages
- 1,251
- Reaction score
- 200
Tired of this error?
Here is a simple fix.
Following my Guide to Compiling
Open the server source. Navigate to org.pokenet.server.feature > TimeService.java
Find the comment in the source:
Below that will be a code, something like
Simply take the php code below, put it into your web server and put the url of the php into the code above.
Ex.
Since its on your server, your the only one actually connecting to it when you start your server, so local host will suffice.
Simply save TimeService.java and compile the server.
Gl
TimeService PHP
Of course change the America/Los_Angeles to your time zone;
Ex:
Code:
ERROR: Cannot reach time server, reverting to local time
Here is a simple fix.
Following my Guide to Compiling
Open the server source. Navigate to org.pokenet.server.feature > TimeService.java
Find the comment in the source:
Code:
/*
* Parses time from a common server.
* The webpage should just have text (no html tags) in the form:
* DAY HOUR MINUTES
* where day is a number from 0 - 6
*/
Below that will be a code, something like
Code:
URL url = new URL("http://pokedev.org/time.php");
Simply take the php code below, put it into your web server and put the url of the php into the code above.
Ex.
Code:
URL url = new URL("http://127.0.0.1/time.php");
Since its on your server, your the only one actually connecting to it when you start your server, so local host will suffice.
Simply save TimeService.java and compile the server.
Gl
TimeService PHP
PHP:
<?php
// set the default timezone to use. Available since PHP 5.1
date_default_timezone_set('America/Los_Angeles');
// Format for PokeNet
// DAY HOUR MINUTES
// where day is a number from 0 - 6
// Prints something like: 2 5 30
echo date('w h i');
// Coded by -DefaulT for PokeNet servers
?>
Of course change the America/Los_Angeles to your time zone;
You must be registered to see links
Ex:
Last edited: