diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-01-14 08:11:45 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-01-14 22:39:06 +0100 |
commit | 820dc1fc534e7586dfe39a965728bca109748be3 (patch) | |
tree | 2b552e40d7dd3eee0a0e471efff1edfcc40c3031 | |
parent | 67473085a1b2b159ea569bc9525ce2535a240507 (diff) | |
download | serenity-820dc1fc534e7586dfe39a965728bca109748be3.zip |
AK: Use appropriate types in AK::Time::from_timestamp factory
Allow the provided year to be negative, and allow millisecond values
larger than 255.
-rw-r--r-- | AK/Time.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -136,7 +136,7 @@ private: } public: - [[nodiscard]] constexpr static Time from_timestamp(u16 year, u8 month, u8 day, u8 hour, u8 minute, u8 second, u8 millisecond) + [[nodiscard]] constexpr static Time from_timestamp(i32 year, u8 month, u8 day, u8 hour, u8 minute, u8 second, u16 millisecond) { constexpr auto milliseconds_per_day = 86'400'000; constexpr auto milliseconds_per_hour = 3'600'000; |