-
2018-05-15 20:35:19
在CentOS 6版本,时间设置有date、hwclock命令
从CentOS 7开始,使用了一个新的命令timedatectl。
1. 基本概念
1.1 GMT、UTC、CST、DST 时间
- UTC
整个地球分为二十四时区,每个时区都有自己的本地时间。在国际无线电通信场合,为了统一起见,使用一个统一的时间,称为通用协调时(UTC, Universal Time Coordinated)。
- GMT
格林威治标准时间 (Greenwich Mean Time)指位于英国伦敦郊区的皇家格林尼治天文台的标准时间,因为本初子午线被定义在通过那里的经线。(UTC与GMT时间基本相同,本文中不做区分)
- CST
中国标准时间 (China Standard Time)
GMT + 8 = UTC + 8 = CST
- DST
夏令时(Daylight Saving Time) 指在夏天太阳升起的比较早时,将时间拨快一小时,以提早日光的使用。(中国不使用)
1.2 硬件时间和系统时间
- 硬件时间
RTC(Real-Time Clock)或CMOS时间,一般在主板上靠电池供电,服务器断电后也会继续运行。仅保存日期时间数值,无法保存时区和夏令时设置。
- 系统时间
一般在服务器启动时复制RTC时间,之后独立运行,保存了时间、时区和夏令时设置。
2. timedatectl 命令
2.1 使用帮助
[root@localhost ~]# timedatectl -h timedatectl [OPTIONS...] COMMAND ... Query or change system time and date settings. -h --help Show this help --version Show package version --adjust-system-clock Adjust system clock when changing local RTC mode --no-pager Do not pipe output into a pager -P --privileged Acquire privileges before execution --no-ask-password Do not prompt for password -H --host=[USER@]HOST Operate on remote host Commands: status Show current time settings set-time TIME Set system time set-timezone ZONE Set system timezone list-timezones Show known timezones set-local-rtc BOOL Control whether RTC is in local time set-ntp BOOL Control whether NTP is enabled
2.2 命令示例
1.显示系统的当前时间和日期
timedatectl # timedatectl status # 两条命令效果等同
2.设置日期与时间
timedatectl set-time "YYYY-MM-DD HH:MM:SS" timedatectl set-time "YYYY-MM-DD" timedatectl set-time "HH:MM:SS"
3.查看所有可用的时区
timedatectl list-timezones # 亚洲 timedatectl list-timezones | grep -E "Asia/S.*"
4.设置时区
timedatectl set-timezone Asia/Shanghai
5.设置硬件时间
# 硬件时间默认为UTC timedatectl set-local-rtc 1 # hwclock --systohc --localtime # 两条命令效果等同
6.启用时间同步
timedatectl set-ntp yes # yes或no; 1或0也可以
3. Chrony 服务
Chrony是网络时间协议的 (NTP) 的另一种实现,由两个程序组成,分别是chronyd和chronyc。
chronyd是一个后台运行的守护进程,用于调整内核中运行的系统时钟和时钟服务器同步。它确定计算机增减时间的比率,并对此进行补偿。
chronyc提供了一个用户界面,用于监控性能并进行多样化的配置。它可以在chronyd实例控制的计算机上工作,也可以在一台不同的远程计算机上工作。
优势:
- 更快的同步只需要数分钟而非数小时时间,从而最大程度减少了时间和频率误差,这对于并非全天 24 小时运行的台式计算机或系统而言非常有用。
- 能够更好地响应时钟频率的快速变化,这对于具备不稳定时钟的虚拟机或导致时钟频率发生变化的节能技术而言非常有用。
- 在初始同步后,它不会停止时钟,以防对需要系统时间保持单调的应用程序造成影响。
- 在应对临时非对称延迟时(例如,在大规模下载造成链接饱和时)提供了更好的稳定性。
- 无需对服务器进行定期轮询,因此具备间歇性网络连接的系统仍然可以快速同步时钟。
在CentOS7下为标配的时间同步服务,当然也可以使用以前的NTP同步方式,不过要安装NTP服务。
3.1 安装使用
yum install chrony systemctl start chronyd systemctl enable chronyd
3.2 配置文件
当Chrony启动时,它会读取/etc/chrony.conf配置文件中的设置。也就是锁,如果需要更改时间同步的服务器,修改此配置文件即可。
[root@localhost ~]# grep -Ev "^$|^#" /etc/chrony.conf # 该参数可以多次用于添加时钟服务器,必须以"server "格式使用。一般而言,你想添加多少服务器,就可以添加多少服务器。 server 0.centos.pool.ntp.org iburst server 1.centos.pool.ntp.org iburst server 2.centos.pool.ntp.org iburst server 3.centos.pool.ntp.org iburst # stratumweight指令设置当chronyd从可用源中选择同步源时,每个层应该添加多少距离到同步距离。默认情况下,设置为0,让chronyd在选择源时忽略源的层级。 stratumweight 0 # chronyd程序的主要行为之一,就是根据实际时间计算出计算机增减时间的比率,将它记录到一个文件中是最合理的,它会在重启后为系统时钟作出补偿,甚至可能的话,会从时钟服务器获得较好的估值。 driftfile /var/lib/chrony/drift # rtcsync指令将启用一个内核模式,在该模式中,系统时间每11分钟会拷贝到实时时钟(RTC)。 rtcsync # 通常,chronyd将根据需求通过减慢或加速时钟,使得系统逐步纠正所有时间偏差。在某些特定情况下,系统时钟可能会漂移过快,导致该调整过程消耗很长的时间来纠正系统时钟。 # 该指令强制chronyd在调整期大于某个阀值时步进调整系统时钟,但只有在因为chronyd启动时间超过指定限制(可使用负值来禁用限制),没有更多时钟更新时才生效。 makestep 10 3 # 这里你可以指定一台主机、子网,或者网络以允许或拒绝NTP连接到扮演时钟服务器的机器。 #allow 192.168/16 # 该指令允许你限制chronyd监听哪个网络接口的命令包(由chronyc执行)。该指令通过cmddeny机制提供了一个除上述限制以外可用的额外的访问控制等级。 bindcmdaddress 127.0.0.1 bindcmdaddress ::1 keyfile /etc/chrony.keys # 指定了/etc/chrony.keys中哪一条密码被使用 commandkey 1 # 此参数指定了产生一个SHA1或MD5加密的密码,存放在/etc/chrony.keys中 generatecommandkey noclientlog logchange 0.5 logdir /var/log/chrony
/etc/chrony.keys文件
[root@localhost ~]# cat /etc/chrony.keys #1 a_key 1 SHA1 HEX:8B96920E9C83612FE34A8C281C31310BD2E1F624
内容来自 RHEL7 -- 使用Chrony设置时间与时钟服务器同步
3.3 chronyc
1.查看帮助
[root@localhost ~]# chronyc --help Usage: chronyc [-h HOST] [-p PORT] [-n] [-4|-6] [-a] [-f FILE] [-m] [COMMAND]
2.查看详细的帮助信息
[root@localhost ~]# chronyc chrony version 2.1.1 Copyright (C) 1997-2003, 2007, 2009-2015 Richard P. Curnow and others chrony comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the GNU General Public License version 2 for details. chronyc> help Commands: accheck <address> : Check whether NTP access is allowed to <address> activity : Check how many NTP sources are online/offline add peer <address> ... : Add a new NTP peer add server <address> ... : Add a new NTP server allow [<subnet-addr>] : Allow NTP access to that subnet as a default allow all [<subnet-addr>] : Allow NTP access to that subnet and all children burst <n-good>/<n-max> [<mask>/<masked-address>] : Start a rapid set of measurements clients : Report on clients that have accessed the server cmdaccheck <address> : Check whether command access is allowed to <address> cmdallow [<subnet-addr>] : Allow command access to that subnet as a default cmdallow all [<subnet-addr>] : Allow command access to that subnet and all children cmddeny [<subnet-addr>] : Deny command access to that subnet as a default cmddeny all [<subnet-addr>] : Deny command access to that subnet and all children cyclelogs : Close and re-open logs files delete <address> : Remove an NTP server or peer deny [<subnet-addr>] : Deny NTP access to that subnet as a default deny all [<subnet-addr>] : Deny NTP access to that subnet and all children dump : Dump all measurements to save files local off : Disable server capability for unsynchronised clock local stratum <stratum> : Enable server capability for unsynchronised clock makestep [<threshold> <updates>] : Correct clock by stepping manual off|on|reset : Disable/enable/reset settime command and statistics manual list : Show previous settime entries maxdelay <address> <new-max-delay> : Modify maximum round-trip valid sample delay for source maxdelayratio <address> <new-max-ratio> : Modify max round-trip delay ratio for source maxdelaydevratio <address> <new-max-ratio> : Modify max round-trip delay dev ratio for source maxpoll <address> <new-maxpoll> : Modify maximum polling interval of source maxupdateskew <new-max-skew> : Modify maximum skew for a clock frequency update to be made minpoll <address> <new-minpoll> : Modify minimum polling interval of source minstratum <address> <new-min-stratum> : Modify minimum stratum of source offline [<mask>/<masked-address>] : Set sources in subnet to offline status online [<mask>/<masked-address>] : Set sources in subnet to online status password [<new-password>] : Set command authentication password polltarget <address> <new-poll-target> : Modify poll target of source reselect : Reselect synchronisation source rtcdata : Print current RTC performance parameters settime <date/time (e.g. Nov 21, 1997 16:30:05 or 16:30:05)> : Manually set the daemon time smoothing : Display current time smoothing state smoothtime reset|activate : Reset/activate time smoothing sources [-v] : Display information about current sources sourcestats [-v] : Display estimation information about current sources tracking : Display system time information trimrtc : Correct RTC relative to system clock waitsync [max-tries [max-correction [max-skew]]] : Wait until synchronised writertc : Save RTC parameters to file authhash <name>: Set command authentication hash function dns -n|+n : Disable/enable resolving IP addresses to hostnames dns -4|-6|-46 : Resolve hostnames only to IPv4/IPv6/both addresses timeout <milliseconds> : Set initial response timeout retries <n> : Set maximum number of retries exit|quit : Leave the program help : Generate this help chronyc> quit
3.常用命令
accheck
检查NTP访问是否对特定主机可用activity
该命令会显示有多少NTP源在线/离线add server
手动添加一台新的NTP服务器clients
在客户端报告已访问到服务器delete
手动移除NTP服务器或对等服务器settime
手动设置守护进程时间tracking
显示系统时间信息
示例:查看时间同步的信息来源
[root@localhost ~]# chronyc sources 210 Number of sources = 3 MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^+ 202.118.1.130 2 6 37 104 +2189us[ +23ms] +/- 27ms ^* dns1.synet.edu.cn 2 6 77 40 +626us[ +21ms] +/- 33ms ^? 2001:da8:9000::81 0 6 0 10y +0ns[ +0ns] +/- 0ns
sources可以加-v参数查看状态信息的说明
[root@localhost ~]# chronyc sources -v 210 Number of sources = 3 .-- Source mode '^' = server, '=' = peer, '#' = local clock. / .- Source state '*' = current synced, '+' = combined , '-' = not combined, | / '?' = unreachable, 'x' = time may be in error, '~' = time too variable. || .- xxxx [ yyyy ] +/- zzzz || Reachability register (octal) -. | xxxx = adjusted offset, || Log2(Polling interval) --. | | yyyy = measured offset, || \ | | zzzz = estimated error. || | | \ MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^+ 202.118.1.130 2 6 37 126 +2189us[ +23ms] +/- 27ms ^* dns1.synet.edu.cn 2 6 77 61 +626us[ +21ms] +/- 33ms ^? 2001:da8:9000::81 0 6 0 10y +0ns[ +0ns] +/- 0ns
4.chronyc在桌面版提供用户界面,需要通过以下命令安装
yum -y install system-config-date
4. 实例
4.1 设置系统时间为中国时区并启用时间同步
# 安装 yum install chrony # 启用 systemctl start chronyd systemctl enable chronyd # 设置亚洲时区 timedatectl set-timezone Asia/Shanghai # 启用NTP同步 timedatectl set-ntp yes
这样服务器的时间就跟NTP服务器同步了,非常简单的操作。
也可以不使用Chrony,用NTP服务的时间同步。但不推荐。
4.2 安装NTP服务使用其同步时间
# 安装ntp服务 yum install ntp # 开机启动服务 systemctl enable ntpd # 启动服务 systemctl start ntpd # 设置亚洲时区 timedatectl set-timezone Asia/Shanghai # 启用NTP同步 timedatectl set-ntp yes # 重启ntp服务 systemctl restart ntpd # 手动同步时间 ntpq -p
4.3 RTC设为本地时间会有告警
[root@localhost ~]# timedatectl set-local-rtc 1 [root@localhost ~]# timedatectl Local time: Thu 2016-05-26 15:31:59 CST Universal time: Thu 2016-05-26 07:31:59 UTC RTC time: Thu 2016-05-26 15:31:59 Time zone: Asia/Shanghai (CST, +0800) NTP enabled: yes NTP synchronized: yes RTC in local TZ: yes DST active: n/a Warning: The system is configured to read the RTC time in the local time zone. This mode can not be fully supported. It will create various problems with time zone changes and daylight saving time adjustments. The RTC time is never updated, it relies on external facilities to maintain it. If at all possible, use RTC in UTC by calling 'timedatectl set-local-rtc 0'.
因为硬件时钟不能保存时区和夏令时调整,修改后就无法从硬件时钟中读取出准确标准时间;不建议修改。
作者:无限小BUG
链接:https://www.jianshu.com/p/fb32239ccf2b
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。更多相关内容 -
12款时间日期选择组件
2015-12-13 15:09:4312款时间时间组件,总有一款适合你,包括日历选择,移动端滑动选择,双月份和时间点,时间轴 -
bootstrap-datetimepicker时间日期选择控件
2016-07-15 16:10:21bootstrap3 中日期时间选择插件 中文 -
Js日期时间选择器
2014-08-06 16:06:30一个js日期和时间选择器,支持精确到毫秒的时间选择 http://blog.csdn.net/yanwushu/article/details/38401749 效果预览 http://www.helloweba.com/demo/timepicker/ -
windows10系统修改时间和日期方法介绍
2021-07-27 06:22:01在使用电脑的时候,有的...今天小编就给大家介绍下载windows10中修改时间和日期的方法,一起来看看吧。>>>windows10系统使用教程大全 windows10系统修改时间和日期方法介绍 方法一:设置中修改第一步、点击...在使用电脑的时候,有的时候因为工作需要或者是当前系统时间不准等情况下要自行设置下电脑系统下的时间,但是还有用户不是很了解在windows10系统中怎么去修改电脑时间和日期。今天小编就给大家介绍下载windows10中修改时间和日期的方法,一起来看看吧。
>>>windows10系统使用教程大全
windows10系统修改时间和日期方法介绍
方法一:设置中修改
第一步、点击最下角打开开始菜单,选择【设置】
第二步、在【设置】界面中找到【时间和语言】
第三步、在【时间和语言】选项中的【日期和时间】的右侧中找到【更改】选项,如果是灰色的,那么将上面的【自动设置时间】选项设置成关闭
第四步、点击【更改】,会显示【更改日期和时间】窗口,在里面进行设置,然后点击【确定】就可以了
方法二:控制面板修改
第一步、鼠标右击左下角windows图标,选择【控制面板】
第二步、在【控制面板】中将右上角查看方式设置成【大图标】,然后选择【日期和时间】
第三步、在【日期和时间】界面中点击【更改日期和时间】,然后再【日期和时间设置】界面中就可以更改i时间与日期了。
以上就是小编整理的关于windows10系统屏幕分辨率调整方法介绍的相关内容,想了解更多的相关资讯与攻略请关注游戏窝手游网。
-
WPF日期时间控件-DateTimePicker
2017-08-04 14:41:461.日期时间控件,可以直接点击使用 2.是源代码文件 3.压缩包里面有使用说明文档,并有当初设计时详细的思路流程可以参考 -
时间日期选择控件(修改版)
2014-03-18 21:55:49之前发过一个滚动选择控件,但里面还有些小Bug,现在发一个修改版的,喜欢的朋友可以下载。 详情,可以看我的博客:http://blog.csdn.net/aiyuan0204?viewmode=contents -
图解python | 时间和日期处理
2022-02-23 18:13:34在Python的开发过程中,经常要处理时间类型的数据。Python内置了 time、datetime 等标准库,帮助我们对时间型进行处理。
作者:韩信子@ShowMeAI
教程地址:http://www.showmeai.tech/tutorials/56
本文地址:http://www.showmeai.tech/article-detail/90
声明:版权所有,转载请联系平台与作者并注明出处
Python日期与时间
在Python的开发过程中,我们经常要处理时间类型的数据,Python内置了
time
,datetime
等标准库,帮助我们对时间型进行处理,在本节内容中,我们将围绕这两个标准库,详细展开介绍常用方法。1.time模块
在Python中,
time
模块主要用于将时间戳转换为具体的日期时间,但time
模块表示日期时间的对象结构简单,不适合进行复杂的操作和表示。(1)模块用法
time
模块中只有time.struct_time
一个类:struct_time
是一个转换秒数得到的结构化的时间对象,可以通过下标或属性名称获取对象的年月日时分秒等属性。调用gmtime()
,localtime()
,strptime()
等方法可得到struct_time
实例。>>> st = time.localtime() >>> st time.struct_time(tm_year=2021, tm_mon=10, tm_mday=27, tm_hour=19, tm_min=27, tm_sec=31, tm_wday=2, tm_yday=300, tm_isdst=0) >>> st.tm_mon 10 >>> st[1] 10
# 在struct_time和字符串之间进行转换 >>> time.strftime('%H:%M:%S') '19:10:37' >>> time.strptime("30 Nov 00", "%d %b %y") time.struct_time(tm_year=2000, tm_mon=11, tm_mday=30, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=3, tm_yday=335, tm_isdst=-1)
import time # 格式化成2021-10-27 19:56:36形式 print(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())) # 格式化成Sat Mar 28 22:24:24 2016形式 print(time.strftime("%a %b %d %H:%M:%S %Y", time.localtime())) # 将格式字符串转换为时间戳 a = "Wed Oct 27 19:56:36 2021" print(time.mktime(time.strptime(a,"%a %b %d %H:%M:%S %Y")))
2.datetime模块
datetime
模块支持日期和时间的运算,它提供了一些用于操作日期和时间的类。该模块的绝大部分功能都围绕着以下 4 个类(以及另外两个关于时区的类)的方法和属性来实现。(1)
date
类及用法date
类表示日期类型。支持的操作符:
- 支持与另一
date
对象进行==
,≤
,<
,≥
,>
等比较操作。 - 支持与
timedelta
对象进行加减操作,结果依然为date
对象。 - 支持与另一
date
对象进行相减操作,得到timedelta
对象。 - 支持哈希。
代码示例:
# 传入日期对应的年月日参数,实例化date类 >>> from datetime import date >>> date(2021, 10, 29) datetime.date(2021, 10, 29) # 可以通过时间戳获得时间 >>> date.fromtimestamp(time.time()) datetime.date(2021, 10, 29) >>> d2 = date(2021, 10, 29) >>> d1 = date(2021, 10, 27) >>> d2 > d1 True >>> d2 - d1 datetime.timedelta(days=2)
(2)
time
类及用法time
类表示时间(时分秒)类型。支持的操作符
- 支持与另一
time
对象进行==
,≤
,<
,≥
,>
等比较操作。 - 支持哈希。
代码示例
>>> from datetime import time >>> t = time.fromisoformat('19:32:10') >>> t.strftime('%Hh %Mm %Ss') '19h 32m 10s' >>> t = time(hour=19, minute=27, second=55) >>> t.isoformat() '19:27:55'
(3)
datetime
类及用法datetime
类表示包含日期时分的时间类型,可以视作date
和time
实例的组合体,因此同时具备了两种对象的大部分方法和属性。支持的操作符
datetime
支持与date
进行相等比较,但结果一定为False
,除此之外只支持与另一datetime
对象执行==
,≤
,<
,≥
,>
等比较操作。- 支持与
timedelta
相加,结果为datetime
;支持与timedelta
对象进行加减,结果依然为datetime
对象,与另一datetime
对象进行相减,得到timedelta
对象。 - 同样支持哈希。
代码示例
>>> from datetime import datetime >>> datetime(year=2021, month=10, day=29) datetime.datetime(2021, 10, 29, 0, 0) >>> datetime.now() datetime.datetime(2021, 10, 29, 14, 51, 18, 731235) >>> datetime.fromisoformat('2021-10-29 16:09:32') datetime.datetime(2021, 10, 29, 16, 9, 32) >>> dt = datetime.now() >>> dt.timestamp() 1635317544.682565 >>> dt.date() datetime.date(2021, 10, 29)
(4)
timedelta
timedelta
类对象表示两个datetime
对象之间的差异。支持的操作符
-
只支持与另一
timedelta
进行比较,进行==
,≤
,<
,≥
,>
等比较操作。 -
timedelta
对象支持支持加减操作,datetime
与timedelta
相加或相减仍然返回datetime
。 -
timedelta
还支持乘除模除等操作符。 -
支持哈希。
-
timedelta
是有符号的,支持abs()
函数,可返回两个datetime
之间的绝对间隔。
代码示例
>>> from datetime import timedelta >>> timedelta(days=2) datetime.timedelta(days=2) >>> dt1 = datetime.now() >>> dt2 = datetime.now() >>> dt2 -dt1 datetime.timedelta(seconds=4, microseconds=476390) >>> d = timedelta(minutes=3, seconds=35) >>> d.total_seconds() 215.0
资料与代码下载
本教程系列的代码可以在ShowMeAI对应的github中下载,可本地python环境运行,能访问Google的宝宝也可以直接借助google colab一键运行与交互操作学习哦!
本教程系列涉及的Python速查表可以在以下地址下载获取:
拓展参考资料
ShowMeAI相关文章推荐
- python介绍
- python安装与环境配置
- python基础语法
- python基础数据类型
- python运算符
- python条件控制与if语句
- python循环语句
- python while循环
- python for循环
- python break语句
- python continue语句
- python pass语句
- python字符串及操作
- python列表
- python元组
- python字典
- python集合
- python函数
- python迭代器与生成器
- python数据结构
- python模块
- python文件读写
- python文件与目录操作
- python错误与异常处理
- python面向对象编程
- python命名空间与作用域
- python时间和日期
ShowMeAI系列教程推荐
- 支持与另一
-
Web前端-时间日期控件
2021-07-22 09:15:13需求:同时可以选择 时间 和 日期 通过设置type属性为datetime,即可在同一个选择器里同时进行日期和时间的选择 默认 效果如下: 参考文章 Element - The world's most popular Vue UI framework需求:同时可以选择 时间 和 日期
通过设置
type
属性为datetime
,即可在同一个选择器里同时进行日期和时间的选择<template> <div class="block"> <span class="demonstration">默认</span> <el-date-picker v-model="value1" type="datetime" placeholder="选择日期时间"> </el-date-picker> </div> </template>
效果如下:
参考文章
-
c# 可输入可选择时间日期控件
2011-01-25 16:17:55c# 可输入可选择时间日期控件。包含源代码与编译好的DLL,功能用户可以再次开发,实现可输入与可以选择功能 -
Android应用日期、选择日期和时间
2018-09-05 21:00:30为了让用户能选择日期和时间,Android提供了日期、时间选择器,分别是DatePicker组件和TimePicker组件。 为了在程序中可以获取用户选择的日期时间,还需要为DatePicker组件和TimePicker组件添加事件监听器。 1... -
js Date日期和时间的处理
2018-12-09 00:31:12在项目里, 日期和时间的不同显示格式经常会用到, 于是趁着周末来学习一番, 这篇文章把犀牛书上处理日期和时间对象的API记录在此, 以及项目里用到了moment.js日期处理类库(参考官网: http://momentjs.cn/), 这个用... -
Android中ListView中数据按照时间\日期分组(分类)标题可悬浮,可下拉刷新
2015-11-29 22:16:20仿虎扑,带悬浮标题的PinnedSectionRefreshListView,帶下拉刷新的Demo,实现时间按照日期和时分秒进行分类.关于PinnedSectionRefreshListView中注释显示英文问题,可以下载... -
日期时间控件
2018-09-05 15:25:33日期时间控件 开发软件使用到日期时间控件的地方很多,但是很多时候Html5自带的时间控件无法满足开发的需要,所以使用这种时间控件完全没有问题 引用 很多时候我们开发引用别人的控件时候,发现老是出现错误,是... -
Android自带的时间空间和日期控件
2016-02-25 15:09:49原文地址:... ... 这一篇博客分别讲解Android平台下,关于日期和时间的几个相关控件。包括DatePicker(日期选择控件)、TimePicker(时间选择控件)、DatePickerDialog(日期选择对话框)、TimeP -
Android 滚动的日期时间选择控件
2014-02-24 11:09:43可以滚动选择的时间日期控件,界面非常美观,且还带有星期。喜欢的朋友可以去下载……详情可以去的我博客查看,谢谢大家! 博客地址:http://blog.csdn.net/aiyuan0204?viewmode=contents -
【每天学点小技巧】昆仑通态窗口显示日期和时间
2020-12-30 18:48:13对于组态软件,我之前常用的是组态王和威纶通。用工控机时候,多数用组态王,用触摸屏时,多数威纶通。最近偶尔有机会用到昆仑通态。决定趁机好好学习一下。好像跟威纶通还是有些不同的啊。在此每天记录一下自己的... -
ionic 日期和时间选择器
2018-03-23 15:14:101,日期选择器:bower install ionic-datepicker --savegithub:点击打开链接index.htnml引用:<script src="lib/ionic-datepicker/dist/ionic-...2,时间选择器:bower install ionic-timepick... -
vue日期时间选择插件_一个Vue插件来选择Jaalali日期和时间
2020-07-22 18:46:51vue日期时间选择插件 Vue波斯日期时间选择器 (vue-persian-datetime-picker) ... 一个vue插件来选择jalali日期和时间。 View demo 查看演示 Download Source 下载源 正在安装 (Installing) npm install vue-p... -
简约好用的日期时间选择js插件
2019-03-17 21:44:25这个插件是zepto.mtimer.js 特别好用的时间日期选择器,用来给网页增光添彩`在这里插入代码片是个不错的选择 这个控件对于特定的日期选择还是很方便的,譬如我的项目只需要选择当前时间之后的三天的时间,可以直接... -
Bootstrap之日期和时间表单组件
2019-01-24 11:30:04Bootstrap的日期时间控件,使用起来很简单,主要功能包括: 1.支持日期选择,格式设定 2.支持时间选择 3.支持时间段选择控制 4.支持中文 二.实例 1.效果截图 2.功能代码 1.css与js组件 &lt;script... -
HTML日期时间插件
2019-03-24 15:07:13简单全面好用的日期时间插件 插件下载地址 1.通过id使用 HTML代码 <h3>日期时间选择器</h3> <input type="text" value="" id="datetimepicker"/><br><br> js代码 $('#... -
vue 日期时间选择器_Vue日期时间选择器
2020-07-27 23:48:33vue 日期时间选择器 Vue日期时间选择器 (Vue Datetime picker) Vue Datetime picker BY Vladyslav Shchepotin. Vue日期时间选择器Vladyslav Shchepotin。 View demo 查看演示 Download Source 下载源 要求 ... -
iView 日期时间选择器设置开始时间至结束时间限制
2020-11-07 16:51:12iView 日期时间选择器设置开始时间至结束时间限制 开始时间不能大于结束时间 结束时间不能小于开始时间 <DatePicker type="datetime" :options="startOption" v-model="startTime" placeholder="开始... -
浏览器提示“您的时钟快了”,计算机的日期和时间不正确,因此无法与xxx.xxx.com建立私密连接
2021-12-14 09:23:07则是建立私密链接时出了问题,站点是通过ssl证书来建立私密链接,ssl证书是有期限的,我是用的免费的一年的证书,每年都要更换,如果没有及时更换,那么就会出现“您计算机的日期和时间 不正确,因此无法与 建立私密... -
(二)STM32添加串口2和RTC--OLED上显示时间日期
2019-06-06 23:10:022、阿里云物联网云平台下发命令通过AIR800控制STM32的LED亮灭(打开或关闭功能,或者定时 自动打开和自动关闭) 3、通过nrf24l01实现点对点通信,阿里云下发数据至air800,STM32(A)串口2接收数据之后进行判断,如果... -
vue日期时间选择组件_强大且易于使用的Vue组件日期时间选择器
2020-07-26 03:48:49vue日期时间选择组件 Vue日期时间选择器 (Vue Datetime Picker) Fast, powerful and easy to use component datetime picker for VueJS. The component includes localization, highlight and disable date, 12/24-... -
layui_日期时间选择
2020-06-28 19:07:22layui_日期时间选择选择器基本选择器效果年选择器效果年月选择器效果时间选择器效果日期加时间选择器效果可能会出现的bug解决 选择器 在看案例之前,先来看一下日期选择器的参数有哪些: elem - 绑定元素: 这个是... -
51单片机lcd1602显示时间日期
2021-01-04 23:45:12实验内容: 使用51单片机控制LCD1602液晶显示屏显示时间/日期 -
elementui日期选择器设置开始时间不能大于结束时间
2020-12-18 16:49:09elementui 日期选择器设置 开始时间不能大于结束时间,结束时间不能小于开始时间 简单容易,就不做详细解释了,复制粘贴,修改对应参数名即可 <el-date-picker v-model="startTime" size="small" type=...