Biancaa-R commented on code in PR #3406:
URL: https://github.com/apache/nuttx-apps/pull/3406#discussion_r2844395368


##########
nshlib/nsh_fscmds.c:
##########
@@ -44,9 +44,12 @@
 #include <libgen.h>
 #include <errno.h>
 #include <debug.h>
-
 #include "nsh.h"
 
+#ifdef CONFIG_ARCH_SIM

Review Comment:
   As I had mentioned , the logic I had built before ,including time.h for all 
cases was too much flash memory (xip code ,data ) for a particular stm board 
that had 128KB flash . So I replaced the logic for manual calculation of 
datetime from epoch instead of using localtime_r(&t, &tm) .
   
   That logic will work in microcontrollers that have RTc and have kept 
TIMEKEEPING configured.
   In simulation , it doesnt work because of  : 
https://github.com/apache/nuttx-apps/issues/3410 .
   
   So I tried to fix it by gettime , settime functions (Only in case SIM is 
used) and since there is enough memory to handle it . 
   
   But I have to remove it as it was pointed out by @linguini1 that its not the 
work of ls hander to display accurate date but , the date given by the system.
   
   or we have to manually modify once before creating files in SIM.
   
   ```
   nsh> date
   Thu, Jan 22 18:08:41 2004 
   nsh> date -s "Feb 23 22:35:00 2026"
   
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to