diff --git a/OpenSimSearch/Modules/SearchModule/OpenSearch.cs b/OpenSimSearch/Modules/SearchModule/OpenSearch.cs index 54adeca..f1d92bf 100644 --- a/OpenSimSearch/Modules/SearchModule/OpenSearch.cs +++ b/OpenSimSearch/Modules/SearchModule/OpenSearch.cs @@ -658,9 +658,10 @@ namespace OpenSimSearch.Modules.OpenSearch //The flags are: SortAsc (1 << 15), PerMeterSort (1 << 17) maturity |= 163840; + //When character before | is a u get upcoming/in-progress events //Character before | is number of days before/after current date //Characters after | is the number for a category - ReqHash["text"] = "0|0"; + ReqHash["text"] = "u|0"; ReqHash["flags"] = maturity.ToString(); ReqHash["query_start"] = "0"; @@ -689,6 +690,7 @@ namespace OpenSimSearch.Modules.OpenSearch mapItemReply mapitem = new mapItemReply(); + //Events use a comma separator in the landing point landingpoint = d["landing_point"].ToString().Split(','); mapitem.x = Convert.ToUInt32(landingpoint[0]); mapitem.y = Convert.ToUInt32(landingpoint[1]); diff --git a/bin/OpenSimSearch.Modules.dll b/bin/OpenSimSearch.Modules.dll index 849defe..a9282d6 100755 Binary files a/bin/OpenSimSearch.Modules.dll and b/bin/OpenSimSearch.Modules.dll differ diff --git a/webroot/query.php b/webroot/query.php index 128fc87..affb746 100644 --- a/webroot/query.php +++ b/webroot/query.php @@ -319,9 +319,8 @@ function dir_events_query($method_name, $params, $app_data) $terms = array(); - //The date and time for events are in UTC - $time_info = gettimeofday(); - $now = $time_info['sec']; + //Event times are in UTC so we need to get the current time in UTC. + $now = time(); if ($day == "u") //Searching for current or ongoing events? { @@ -331,7 +330,8 @@ function dir_events_query($method_name, $params, $app_data) else { //For events in a given day we need to determine the days start time - $now -= ($now % 86400); + $now -= idate("Z"); //Adjust for timezone + $now -= ($now % 86400); //Adjust to start of day //Is $day a number of days before or after current date? if ($day != 0) @@ -505,7 +505,7 @@ function event_info_query($method_name, $params, $app_data) $data = array(); while (($row = mysql_fetch_assoc($result))) { - $date = strftime("%G-%m-%d %H:%M:%S",$row["dateUTC"]); + $date = strftime("%G-%m-%d %H:%M:%S", $row["dateUTC"]); $category = "*Unspecified*"; if ($row['category'] == 18) $category = "Discussion";