mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-12 05:14:10 +02:00
Allow handling of ToFileTimeUtc
error
This commit is contained in:
parent
35584ef288
commit
4072e667c9
1 changed files with 2 additions and 4 deletions
|
@ -555,15 +555,13 @@ namespace System
|
||||||
return ToUniversalTime().ToFileTimeUtc();
|
return ToUniversalTime().ToFileTimeUtc();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int64 ToFileTimeUtc()
|
public Result<int64> ToFileTimeUtc()
|
||||||
{
|
{
|
||||||
// Treats the input as universal if it is not specified
|
// Treats the input as universal if it is not specified
|
||||||
int64 ticks = ((InternalKind & LocalMask) != 0UL) ? ToUniversalTime().InternalTicks : this.InternalTicks;
|
int64 ticks = ((InternalKind & LocalMask) != 0UL) ? ToUniversalTime().InternalTicks : this.InternalTicks;
|
||||||
ticks -= FileTimeOffset;
|
ticks -= FileTimeOffset;
|
||||||
if (ticks < 0)
|
if (ticks < 0)
|
||||||
{
|
return .Err;
|
||||||
Runtime.FatalError();
|
|
||||||
}
|
|
||||||
return ticks;
|
return ticks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue