View Single Post
  #7  
Old 01-22-2014, 05:13 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
These are the two functions I wrote:

PHP Code:
public function actualtimevar2(tv) {
  
// For converting real epoch timestamps to 
  // server's timevar2.
  
temp.offset = (60 6) - 12;
  return 
tv temp.offset;
}

public function 
determinetimevar2(str) {
  
// I.e. "2013-11-30 15:00:00 CST"
  // Converts and offsets to match server timevar2.
  
return actualtimevar2(convertstringtotime("%Y-%m-%d %H:%M:%S %Z"str)); 

For exact-time events I recommend doing:

this.event_start = determinetimevar2("2014-01-21 18:00:00 CST");

Then using server's timevar2 and comparing it against this.event_start.
__________________
Quote:
Reply With Quote