zoukankan      html  css  js  c++  java
  • openwrt 修改系统时间

    openwrt 修改系统时间

    可以通过date -help查看使用方式

    Usage: date [OPTIONS] [+FMT] [TIME]
    
    Display time (using +FMT), or set time
    
    	[-s,--set] TIME	Set time to TIME
    	-u,--utc	Work in UTC (don't convert to local time)
    	-R,--rfc-2822	Output RFC-2822 compliant date string
    	-I[SPEC]	Output ISO-8601 compliant date string
    			SPEC='date' (default) for date only,
    			'hours', 'minutes', or 'seconds' for date and
    			time to the indicated precision
    	-r,--reference FILE	Display last modification time of FILE
    	-d,--date TIME	Display TIME, not 'now'
    	-D FMT		Use FMT for -d TIME conversion
    	-k		Set Kernel timezone from localtime and exit
    
    Recognized TIME formats:
    	hh:mm[:ss]
    	[YYYY.]MM.DD-hh:mm[:ss]
    	YYYY-MM-DD hh:mm[:ss]
    	[[[[[YY]YY]MM]DD]hh]mm[.ss]
    由上述得知,使用-s 或者--set 来进行修改时间
    # 修改时间为年-月-日
    
    date -s 2021-01-12
    
    # 修改时分秒时间
    date -s 16:33
  • 相关阅读:
    Joda-Time 简介
    SimpleDateFormat 的线程安全问题
    SimpleDateFormat 的线程安全问题
    自定义类加载器
    自定义类加载器
    javap与 i++,++i
    javap与 i++,++i
    I/O模型
    I/O模型
    逻辑运算符(上) ---没用
  • 原文地址:https://www.cnblogs.com/z3286586/p/15146172.html
Copyright © 2011-2022 走看看