Skip to content

Commit

Permalink
fix getting timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
gagyn committed Jul 19, 2020
1 parent 8a470e8 commit 2d1f8d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static string MutedUser(this ResponsesService responsesService, UserConte
{
return responsesService.ProcessResponse("MutedUser",
new KeyValuePair<string, string>("user", mutedUser.Name),
new KeyValuePair<string, string>("timeEnd", TimeZoneInfo.ConvertTimeFromUtc(timeEnd, TimeZoneInfo.FindSystemTimeZoneById("Central Europe Standard Time")).ToString("dd.MM.yyyy HH:mm:ss", CultureInfo.InvariantCulture)));
new KeyValuePair<string, string>("timeEnd", TimeZoneInfo.ConvertTimeFromUtc(timeEnd, TimeZoneInfo.Local).ToString("dd.MM.yyyy HH:mm:ss", CultureInfo.InvariantCulture)));
}

public static string UnmutedUser(this ResponsesService responsesService, UserContext unmutedUser)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private async Task NotifyUserAboutMute(Contexts contexts, UserContext mutedUser,
{
{"Serwer:", server.Name},
{"Powód:", $"{muteEvent.Reason}"},
{"Czas wygaśnięcia:", TimeZoneInfo.ConvertTimeFromUtc(muteEvent.TimeRange.End, TimeZoneInfo.FindSystemTimeZoneById("Central Europe Standard Time")).ToString("dd.MM.yyyy HH:mm:ss", CultureInfo.InvariantCulture)}
{"Czas wygaśnięcia:", TimeZoneInfo.ConvertTimeFromUtc(muteEvent.TimeRange.End, TimeZoneInfo.Local).ToString("dd.MM.yyyy HH:mm:ss", CultureInfo.InvariantCulture)}
};
return (title, description, values);
}
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
version: '3'
services:
watchman-web:
image: gagyn/watchman
build: .
ports:
- "8080:80"
restart: "unless-stopped"
volumes:
- ./appsettings.json:/app/appsettings.json
- ./appsettings.json:/app/appsettings.json
- /etc/localtime:/etc/localtime:ro

0 comments on commit 2d1f8d4

Please sign in to comment.