1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Allow handling of ToFileTimeUtc error

This commit is contained in:
disarray2077 2022-02-23 16:28:37 -03:00 committed by GitHub
parent 35584ef288
commit 4072e667c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -555,15 +555,13 @@ namespace System
return ToUniversalTime().ToFileTimeUtc();
}
public int64 ToFileTimeUtc()
public Result<int64> ToFileTimeUtc()
{
// Treats the input as universal if it is not specified
int64 ticks = ((InternalKind & LocalMask) != 0UL) ? ToUniversalTime().InternalTicks : this.InternalTicks;
ticks -= FileTimeOffset;
if (ticks < 0)
{
Runtime.FatalError();
}
return .Err;
return ticks;
}