Daylight savings dialup admin

Cory Robson cory at cmi.net.au
Tue Jan 16 02:14:55 CET 2007



Since no one responded here is the additional code snippet to remedy the
situation.


$ts = date("U"); //gets current server date as a timestamp
$tsgmt = date("Z"); //gets current server timestamp offset from GMT

	if ($tsgmt == "32400"){ //is current server timestamp offset equal
to "32400" (9 hours)
		$hourdiff = "0"; //if 8 hours then $timediff = 0 hours
	}else{
		$hourdiff = "1"; //if not 9 hours then $timediff = 1 hours
(Daylight Saving)
	}
	
$timeadjust = ($hourdiff * 3600);
$perthdate = date("l, d F Y H:i:s T",time() + $timeadjust);


$date = $perthdate;



I'm having several problems still with the php scripting not display my
current date time correctly.

The system time is correct and mysql timestamps are correct both the console
and mysql show the correct time and date showing the true daylight savings
adjustment however the user_admin and user_finger page does not show this
counters show the customer online time incorrect by an hour

Any coders know how I can get php to show the correct time adjustment
automatically?


Thanks

- 
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html

__________ NOD32 1951 (20070101) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com





More information about the Freeradius-Users mailing list