We basically cast a struct timespec pointer to a time_t pointer when we pass the clock_settime() paramter to localtime(). Explicitly express that in the source code.
tya ; Restore A
; Get tm
+ .assert timespec::tv_sec = 0, error
jsr _localtime
sta ptr1
stx ptr1+1
jsr pushax
+ .assert timespec::tv_sec = 0, error
jsr _localtime
sta ptr1
stx ptr1+1
jsr pushax
+ .assert timespec::tv_sec = 0, error
jsr _localtime
sta ptr1
stx ptr1+1
jsr sys_bank
jsr pushax
+ .assert timespec::tv_sec = 0, error
jsr _localtime
sta ptr1
stx ptr1+1
jsr sys_bank
jsr pushax
+ .assert timespec::tv_sec = 0, error
jsr _localtime
sta ptr1
stx ptr1+1