Skip to content

Commit

Permalink
Merge pull request #25 from mkajic20/hotfix/creation-time
Browse files Browse the repository at this point in the history
Hotfix/creation-time
  • Loading branch information
mkajic20 authored Jan 24, 2024
2 parents 56cdbdd + 25d33aa commit 323a88b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion SmartCharger.Business/Services/ChargerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public async Task<ChargerResponseDTO> CreateNewCharger(ChargerDTO charger)
Latitude = charger.Latitude,
Longitude = charger.Longitude,
Active = false,
CreationTime = DateTime.Now.ToUniversalTime(),
CreationTime = DateTime.Now.ToUniversalTime().AddHours(1),
CreatorId = charger.CreatorId
};

Expand Down
1 change: 1 addition & 0 deletions SmartCharger.Business/Services/EventService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ public async Task<EventResponseDTO> EndCharging(EventChargingDTO eventDTO)

chargingEvent.Charger.Active = false;
chargingEvent.Card.UsageStatus = false;
chargingEvent.Charger.LastSync = eventDTO.EndTime;

Event selectedEvent = new Event
{
Expand Down
4 changes: 2 additions & 2 deletions SmartCharger.Business/Services/GoogleLoginService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public async Task<LoginResponseDTO> LoginWithGoogleAsync(string authorizationCod
FirstName = firstName,
LastName = googleUser.LastName,
RoleId = 2,
CreationTime = DateTime.UtcNow,
Active = true,
CreationTime = DateTime.Now.ToUniversalTime().AddHours(1),
Active = true,
};

await _context.Users.AddAsync(user);
Expand Down
2 changes: 1 addition & 1 deletion SmartCharger.Business/Services/RegisterService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public async Task<RegisterResponseDTO> RegisterAsync(RegisterDTO registerDTO)
Email = registerDTO.Email,
Password = hashedPassword,
Active = true,
CreationTime = DateTime.Now.ToUniversalTime(),
CreationTime = DateTime.Now.ToUniversalTime().AddHours(1),
Salt = salt,
RoleId = 2
};
Expand Down

0 comments on commit 323a88b

Please sign in to comment.