openbullet / openbullet/OpenBullet2
[Bug]: UnixTimeToDate Int32 overflow
Open
@openbullet is already working on this.
Since Jun 11, 2024.
bug
low priority
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 602
- PR merge metrics
- No merged PRs in 30d
Description
Version of the software
0.2.0
Operating system
Windows 10
Browser / Native
Chrome 97
What happened?
Conversion of unix time will raise an Int32 Overflow Exception for too high value .
in OpenBullet2/RuriLib/Functions/Time/TimeConverter.cs
UnixTimeToDate(... int unixTime ...)
should use long
int32 max value is 2147483647 == "Tuesday 19 January 2038 03:14:07"
Converting value past this day is impossible.
Stacker, loli and C# are impacted
Relevant LoliCode if needed
BLOCK:ConstantString
value = "4294692759"
=> VAR @constantStringOutput
ENDBLOCK
BLOCK:UnixTimeToDate
unixTime = @constantStringOutput
=> VAR @unixTimeToDateOutput
ENDBLOCK
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.