Jump to content

Eastern Standard Time


CincinnatiBearcats
 Share

You are about to reply to a thread that has been inactive for 4398 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Here's Void's version, posted in the LSL wiki at http://wiki.secondlife.com/wiki/LlGetGMTclock

//--// GMT function with local offsets in 12hr format //--// integer gIntMinute = 60;    //-- 1 minute in secondsinteger gIntHour   = 3600;  //-- 1 hour in secondsinteger gInt12Hr   = 43200; //-- 12hrs in secondsinteger gIntDay    = 86400; //-- 1 day in seconds string fStrGMTwOffset( integer vIntLocalOffset ){   //-- get the correct time in seconds for the given offset  integer vIntBaseTime = ((integer)llGetGMTclock() + gIntDay + vIntLocalOffset * gIntHour) % gIntDay;  string vStrReturn;    //-- store morning or night and reduce to 12hour format if needed  if (vIntBaseTime < gInt12Hr){    vStrReturn = " AM";  }else{    vStrReturn = " PM";    vIntBaseTime = vIntBaseTime % gInt12Hr;  }    //-- get and format minutes  integer vIntMinutes = (vIntBaseTime % gIntHour) / gIntMinute;  vStrReturn = (string)vIntMinutes + vStrReturn;  if (10 > vIntMinutes){    vStrReturn = "0" + vStrReturn;  }    //-- add in the correct hour, force 0 to 12  if (vIntBaseTime < gIntHour){    vStrReturn = "12:" + vStrReturn;  }else{    vStrReturn = (string)(vIntBaseTime / gIntHour) + ":" + vStrReturn;  }  return vStrReturn;} default{  touch_start( integer vIntTouched ){     //-- '-5' is EST, no adjustment for DST    llSay( 0, "The time is now " + fStrGMTwOffset( -5 ) );  }}

 All I did was put in the GMT -5 offset for EST.

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4398 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...