diff options
| author | Simon Cruanes <simon.cruanes.2007@m4x.org> | 2024-09-21 21:08:35 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-21 21:08:35 -0400 |
| commit | 32e13f17aea7068b5621d21f97ef820c8dae16a4 (patch) | |
| tree | e6aa0b79d831659a6c02beeba6ad41072c3e3690 /core/time | |
| parent | d08b3d3b82145faefe315d68350878c61b218b94 (diff) | |
Apply suggestions from code review
Co-authored-by: flysand7 <yyakut.ac@gmail.com>
Diffstat (limited to 'core/time')
| -rw-r--r-- | core/time/rfc3339.odin | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/time/rfc3339.odin b/core/time/rfc3339.odin index 3ed149ad1..9d816b3fa 100644 --- a/core/time/rfc3339.odin +++ b/core/time/rfc3339.odin @@ -204,8 +204,8 @@ time_to_rfc3339 :: proc(time: Time, utc_offset : int = 0, include_nanos := true, if datetime.year < 0 || datetime.year >= 10_000 { return "", false } - temp_string := [30]u8{} - offset : uint = 0 // offset in temp_string + temp_string := [36]u8{} + offset : uint = 0 print_as_fixed_int :: proc(dst: []u8, offset: ^uint, width: i8, i: i64) { i := i @@ -275,7 +275,7 @@ time_to_rfc3339 :: proc(time: Time, utc_offset : int = 0, include_nanos := true, offset += 1 } else { temp_string[offset] = utc_offset > 0 ? '+' : '-' - offset += 1; + offset += 1 utc_offset := abs(utc_offset) print_as_fixed_int(temp_string[:], &offset, 2, i64(utc_offset / 60)) temp_string[offset] = ':' |