# SDL: time: Fix nanosecond variable on PSP

**URL:** <https://discourse.libsdl.org/t/sdl-time-fix-nanosecond-variable-on-psp/69384>\
**Category:** SDL Commits\
**Created:** [September 24, 2026, 1:34pm UTC](https://discourse.libsdl.org/t/sdl-time-fix-nanosecond-variable-on-psp/69384 "2026-09-24T13:34:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [September 24, 2026, 1:34pm UTC](https://discourse.libsdl.org/t/sdl-time-fix-nanosecond-variable-on-psp/69384/1 "2026-09-24T13:34:11Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/34d66a4d3965e756a2e83711f2986310e933cab4>

```diff
From 34d66a4d3965e756a2e83711f2986310e933cab4 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Wed, 23 Sep 2026 13:56:50 -0400
Subject: [PATCH] time: Fix nanosecond variable on PSP

---
 src/time/psp/SDL_systime.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/time/psp/SDL_systime.c b/src/time/psp/SDL_systime.c
index f45a969411c5a..70b0d714239dd 100644
--- a/src/time/psp/SDL_systime.c
+++ b/src/time/psp/SDL_systime.c
@@ -130,7 +130,7 @@ bool SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime *dt, bool localTime)
             dt->hour = t.hour;
             dt->minute = t.minute;
             dt->second = t.second;
- dt->nanosecond = ticks % SDL_NS_PER_SECOND;
+ dt->nanosecond = rem_ns;
             dt->utc_offset = (int)(((Sint64)local - (Sint64)sceTicks) / (Sint64)res);
 
             SDL_CivilToDays(dt->year, dt->month, dt->day, &dt->day_of_week, NULL);

```
