Bug in time.add_seconds #1162.

This commit is contained in:
Christoffer Lerno
2024-03-01 12:09:47 +01:00
parent 75e7176675
commit feebd2a733
2 changed files with 2 additions and 1 deletions

View File

@@ -78,7 +78,7 @@ fn Time now()
$endif
}
fn Time Time.add_seconds(time, long seconds) => time + (Time)(seconds * (long)MS);
fn Time Time.add_seconds(time, long seconds) => time + (Time)(seconds * (long)SEC);
fn Time Time.add_minutes(time, long minutes) => time + (Time)(minutes * (long)MIN);
fn Time Time.add_hours(time, long hours) => time + (Time)(hours * (long)HOUR);
fn Time Time.add_days(time, long days) => time + (Time)(days * (long)DAY);

View File

@@ -14,6 +14,7 @@
- `.$Type = ...` and `.$foo = ...` now works #1156.
- `int.min` incorrect behaviour #1154.
- Bitstruct cast to other bitstruct by way of underlying type would fail #1159.
- Bug in `time.add_seconds` #1162.
### Stdlib changes
- Added `new_aligned` and `alloc_aligned` functions to prevent accidental under-alignment when allocating simd.