Skip to content

Commit

Permalink
Merge pull request #135 from ONLYOFFICE/bugfix/65709
Browse files Browse the repository at this point in the history
Bugfix/65709
  • Loading branch information
pavelbannov authored Jan 11, 2024
2 parents 6ccc639 + da0a56c commit 93eb325
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion common/ASC.Api.Core/Core/ApiDateTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public override ApiDateTime Read(ref Utf8JsonReader reader, Type typeToConvert,
}

if (DateTime.TryParseExact(reader.GetString(), ApiDateTime.Formats,
CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind, out var dateTime))
CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal, out var dateTime))
{
return new ApiDateTime(dateTime, TimeSpan.Zero);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public class LinkRequestDto
public FileShare Access { get; set; }

/// <summary>Link expiration date</summary>
/// <type>System.DateTime, System</type>
public DateTime? ExpirationDate { get; set; }
/// <type>ASC.Api.Core.ApiDateTime, ASC.Api.Core</type>
public ApiDateTime ExpirationDate { get; set; }

/// <summary>Link type</summary>
/// <type>ASC.Files.Core.ApiModels.ResponseDto.LinkType, ASC.Files.Core</type>
Expand Down
2 changes: 1 addition & 1 deletion products/ASC.Files/Server/Api/VirtualRoomsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ public async Task<FileShareDto> SetLinkAsync(T id, LinkRequestDto inDto)
{
LinkType.Invitation => await _fileStorageService.SetInvitationLinkAsync(id, inDto.LinkId, inDto.Title, inDto.Access),
LinkType.External => await _fileStorageService.SetExternalLinkAsync(id, FileEntryType.Folder, inDto.LinkId, inDto.Title,
inDto.Access is not (FileShare.Read or FileShare.None) ? FileShare.Read : inDto.Access , inDto.ExpirationDate ?? default, inDto.Password, inDto.DenyDownload),
inDto.Access is not (FileShare.Read or FileShare.None) ? FileShare.Read : inDto.Access , inDto.ExpirationDate, inDto.Password, inDto.DenyDownload),
_ => throw new InvalidOperationException()
};

Expand Down

0 comments on commit 93eb325

Please sign in to comment.