Fotis Panagiotopoulos
0cdb2cfa48
Fixed compiler warnings.
2022-08-23 01:39:59 +08:00
Jiuzhu Dong
63f28099e3
nsh/timedatectl: add timedatectl to get/set TZ
...
follow https://man7.org/linux/man-pages/man1/timedatectl.1.html
nsh> timedatectl
TimeZone: CST, 28800
Local time: Sat, Apr 02 05:59:43 2022 CST
Universal time: Fri, Apr 01 21:59:43 2022 GMT
RTC time: Sun, Apr 01 21:59:42 2022
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-07 02:52:11 +08:00
Xiang Xiao
0b722cc864
nshlib: Remove format variable from date_showtime
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-23 01:21:44 +08:00
Xiang Xiao
4cc0c755bf
Remove CONFIG_CLOCK_MONOTONIC special code
...
since this opion doesn't exist anymore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-23 01:21:44 +08:00
Alin Jerpelea
4f3f62c8fc
nshlib: update licenses to Apache
...
Gregory Nutt is has submitted the SGA
Uros Platise has submitted the ICLA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-11 02:42:05 -05:00
Xiang Xiao
8e06d060c2
nsh/date: Support -u option
...
user can use both UTC and local time now
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-02 11:10:31 +01:00
Xiang Xiao
ecae66fe59
Replace all CONFIG_NFILE_STREAMS with CONFIG_FILE_STREAM
...
follow up the kernel side change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic27ad65d7cc2ea570921e0c17098dcb6bfe1893a
2020-09-11 17:57:58 +08:00
Xiang Xiao
9d80399bd5
nsh: Accept the command line arguments like sh
...
Usage: nsh [<script-path>|-c <command>]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ifb76b27e7fd09d26b1f6e48c391fed0972018041
2020-08-19 14:32:53 -07:00
Xiang Xiao
1154735ca6
Refine the preprocess conditional guard style
2020-01-31 11:04:10 -06:00
Xiang Xiao
fd3775e068
Remove CONFIG_TIME_EXTENDED conditioning
...
Remove CONFIG_TIME_EXTENDED related stuff since kernel remove this option
2020-01-23 08:36:03 -06:00
Valmantas Palikša
5484407877
nshlib/nsh_timcmds.c: Initialized struct tm cause 'date -s' to fail.
2019-03-18 08:04:40 -06:00
GregoryN
3bf4b6d245
Merged altconsole into master
2018-12-08 18:53:54 -06:00
Gregory Nutt
81645fe18f
strcasecmp, strncasecmp, bzero, bcmp, and bcopy should be defined in strings.h, not string.h. bzero, bcmp, and bcopy are legacy functions; the contemporary counterparts should be used instead.
2017-02-16 15:58:15 -06:00
Gregory Nutt
c13b9e6a51
Fix compile error in time command when certain features are disabled
2016-01-08 11:23:45 -06:00
Gregory Nutt
611bd4684f
Update some comments
2016-01-04 12:36:38 -06:00
Gregory Nutt
6c89c01cf5
Fix a scaling error in the new time command
2015-12-31 10:03:04 -06:00
Gregory Nutt
f09b7e400f
NSH: Add a time command that can be used to time other commands
2015-12-31 09:16:38 -06:00
Gregory Nutt
882ae41aee
If CONFIG_LIBC_LOCALTIME or CONFIG_TIME_EXTENDED are defined, then the NSH date command should also show the day ofo the week
2015-11-25 12:52:36 -06:00
Gregory Nutt
aacfce081e
Fix several cosmetic, C coding style issues
2015-10-03 11:03:42 -06:00
Gregory Nutt
e9447c6058
Standardize nameing of the pre-processor definitiongs group header
2015-10-02 14:06:11 -06:00
Gregory Nutt
49bb0ed48e
time.h: Add localtime prototypes; NSH: Correct test for gmtime_r return value
2015-04-21 09:26:18 -06:00
Gregory Nutt
10fc3ed1ac
configs/sim/src: Add logic to test localtime and TZ database. See apps/system/README.txt for info
2015-04-15 11:00:40 -06:00
Gregory Nutt
23075e0b30
Allow NSH date command with no RTC. This command is useful without an RTC too. Also, this permits testing on the simulator which never has an RTC
2015-04-11 12:13:18 -06:00
Gregory Nutt
b651f37ce7
Remove CONFIG_DISABLE_CLOCK
2014-08-07 12:35:24 -06:00
patacongo
f392209c72
NSH now uses the new Telnet daemon and built-in tasks started by NSH can be used over Telnet
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4361 42af7a65-404d-4744-a932-0658087f49c3
2012-02-02 16:04:09 +00:00
patacongo
49ffd7577a
Fix errors in gmtime and gmtime_r
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3933 42af7a65-404d-4744-a932-0658087f49c3
2011-09-01 17:56:03 +00:00
patacongo
39df853260
Add NSH date command
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3932 42af7a65-404d-4744-a932-0658087f49c3
2011-09-01 15:09:49 +00:00