diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-06-12 14:24:10 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-06-12 14:24:10 +0200 |
| commit | 9b6666e70829e3c341e709b1b0578603566d852b (patch) | |
| tree | 3e84d9fc0dccb85b35f1001c40ac2a49b0b16e17 /server/src/Utilities/GithubAuthenticationHelpers.cs | |
| parent | 7fa6822da7cfe5629275b3e2de26dd89556c960e (diff) | |
| download | greatoffice-9b6666e70829e3c341e709b1b0578603566d852b.tar.xz greatoffice-9b6666e70829e3c341e709b1b0578603566d852b.zip | |
refactor: Introduce AppDateTime and use it whenever we need to get current DateTime
This changes enables us to change timezones in testing
Diffstat (limited to 'server/src/Utilities/GithubAuthenticationHelpers.cs')
| -rw-r--r-- | server/src/Utilities/GithubAuthenticationHelpers.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/Utilities/GithubAuthenticationHelpers.cs b/server/src/Utilities/GithubAuthenticationHelpers.cs index f924ecc..f78e1ae 100644 --- a/server/src/Utilities/GithubAuthenticationHelpers.cs +++ b/server/src/Utilities/GithubAuthenticationHelpers.cs @@ -52,7 +52,7 @@ public static class GithubAuthenticationHelpers if (!handled) { var userId = Guid.NewGuid(); - var insertUserQuery = $@"INSERT INTO users VALUES ('{userId}', '{githubUsername}', '', '{DateTime.UtcNow}')"; + var insertUserQuery = $@"INSERT INTO users VALUES ('{userId}', '{githubUsername}', '', '{AppDateTime.UtcNow}')"; await connection.OpenAsync(); await using var insertUserCommand = new NpgsqlCommand(insertUserQuery, connection); await insertUserCommand.ExecuteNonQueryAsync(); |
