Skip to content

Commit

Permalink
Merge pull request #22 from shipyy/add-utc-to-timestamps
Browse files Browse the repository at this point in the history
Add Timezone to timestamps
  • Loading branch information
Sarrus1 authored Aug 25, 2022
2 parents 9d75018 + 422e6d2 commit 7b4da65
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
## Release Notes

## [2.5.0]

### Added

- Added Timezone to Timestamps.

### Fixed

- Missing ArrayList Handle Closing.

## [2.4.1]

### Fixed
Expand Down
12 changes: 9 additions & 3 deletions scripting/SurfTimer-discord.sp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public Plugin myinfo =
name = "SurfTimer-Discord",
author = "Sarrus",
description = "A module for SurfTimer-Official to send Discord Notifications when a new record is set.",
version = "2.4.1",
version = "2.5.0",
url = "https://github.com/Sarrus1/SurfTimer-discord"
};

Expand Down Expand Up @@ -626,10 +626,14 @@ public void mapchallenge_OnChallengeEnd(int client, char szMapName[32], int styl
field = new EmbedField("", "", true);
embed.AddField(field);

field = new EmbedField("Started", szInitial_Timestamp, true);
char szInitital_Timestamp_withTimezone[64];
Format(szInitital_Timestamp_withTimezone, sizeof szInitital_Timestamp_withTimezone, "(UTC) %s", szInitial_Timestamp);
field = new EmbedField("Started", szInitital_Timestamp_withTimezone, true);
embed.AddField(field);

field = new EmbedField("Ends", szFinal_Timestamp, true);
char szFinal_Timestamp_withTimezone[64];
Format(szFinal_Timestamp_withTimezone, sizeof szFinal_Timestamp_withTimezone, "(UTC) %s", szFinal_Timestamp);
field = new EmbedField("Ends", szFinal_Timestamp_withTimezone, true);
embed.AddField(field);

field = new EmbedField("", "", true);
Expand Down Expand Up @@ -663,6 +667,8 @@ public void mapchallenge_OnChallengeEnd(int client, char szMapName[32], int styl
}
Format(szTop5_finalstring, sizeof szTop5_finalstring, "```fix\n%s\n```", szTop5_finalstring);

delete szChallengeTop5;

field = new EmbedField("TOP 5", szTop5_finalstring, false);
embed.AddField(field);

Expand Down

0 comments on commit 7b4da65

Please sign in to comment.