aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorSimon Cruanes <simon.cruanes.2007@m4x.org>2024-09-22 00:08:07 -0400
committerSimon Cruanes <simon.cruanes.2007@m4x.org>2024-09-22 00:08:07 -0400
commita1349d877601df166a6b4bb8a1a38126802dcc9d (patch)
tree5c8035e9b8f0fbed85d92b52ef12b1bc2c0a4d96 /core
parent32e13f17aea7068b5621d21f97ef820c8dae16a4 (diff)
fix vet warnings
Diffstat (limited to 'core')
-rw-r--r--core/time/rfc3339.odin4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/time/rfc3339.odin b/core/time/rfc3339.odin
index 9d816b3fa..20e8ea0bb 100644
--- a/core/time/rfc3339.odin
+++ b/core/time/rfc3339.odin
@@ -199,6 +199,8 @@ The boolean `ok` is false if the `time` is not a valid datetime, or if allocatin
- `include_nanos`: whether to include nanoseconds in the result.
*/
time_to_rfc3339 :: proc(time: Time, utc_offset : int = 0, include_nanos := true, allocator := context.allocator) -> (res: string, ok: bool) {
+ utc_offset := utc_offset
+
// convert to datetime
datetime := time_to_datetime(time) or_return
@@ -276,7 +278,7 @@ time_to_rfc3339 :: proc(time: Time, utc_offset : int = 0, include_nanos := true,
} else {
temp_string[offset] = utc_offset > 0 ? '+' : '-'
offset += 1
- utc_offset := abs(utc_offset)
+ utc_offset = abs(utc_offset)
print_as_fixed_int(temp_string[:], &offset, 2, i64(utc_offset / 60))
temp_string[offset] = ':'
offset += 1