mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-19 02:51:51 +00:00
1.3.6a
- Minor changes - Added `css_gravity` command - Added `css_money` command - Changed Utc time to LocalTime - Updated translations (ChatGPT generated) - Updated css version
This commit is contained in:
@@ -21,7 +21,7 @@ public class AdminSQLManager
|
||||
|
||||
public async Task<List<(List<string>, int)>> GetAdminFlags(string steamId)
|
||||
{
|
||||
DateTime now = DateTime.UtcNow;
|
||||
DateTime now = DateTime.UtcNow.ToLocalTime();
|
||||
|
||||
await using var connection = await _database.GetConnectionAsync();
|
||||
|
||||
@@ -62,7 +62,7 @@ public class AdminSQLManager
|
||||
|
||||
public async Task<List<(string, List<string>, int, DateTime?)>> GetAllPlayersFlags()
|
||||
{
|
||||
DateTime now = DateTime.UtcNow;
|
||||
DateTime now = DateTime.UtcNow.ToLocalTime();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -181,10 +181,10 @@ public class AdminSQLManager
|
||||
|
||||
flags = flags.Replace(" ", "");
|
||||
|
||||
DateTime now = DateTime.UtcNow;
|
||||
DateTime now = DateTime.UtcNow.ToLocalTime();
|
||||
DateTime? futureTime;
|
||||
if (time != 0)
|
||||
futureTime = now.AddMinutes(time);
|
||||
futureTime = now.ToLocalTime().AddMinutes(time);
|
||||
else
|
||||
futureTime = null;
|
||||
|
||||
@@ -214,7 +214,7 @@ public class AdminSQLManager
|
||||
await using var connection = await _database.GetConnectionAsync();
|
||||
|
||||
string sql = "DELETE FROM sa_admins WHERE ends IS NOT NULL AND ends <= @CurrentTime";
|
||||
await connection.ExecuteAsync(sql, new { CurrentTime = DateTime.Now });
|
||||
await connection.ExecuteAsync(sql, new { CurrentTime = DateTime.Now.ToLocalTime() });
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user