server| function//in PHP processing date is very inconvenient, such as the two date difference between the month? What should we do?
FileName: date.inc.php3
Before you use these two functions, you must first convert the date or datetime to the
server|sqlserver| function//filename: date.inc.php3
Before you use these two functions, you must first convert the date or datetime to the timestamp type.
Such as:
$today =mktime (0,0,0,date ("M"), Date ("D"), Date ("Y"));
/**** simulate the
[TOC]Shell programming One, Shell script introduction
The shell is a program written in C that is a bridge for users to use Linux. The shell is both a command language and a programming language.The shell is a scripting language;Can use
Time to modify Linux can use the date directiveThe function of the date command is to display and set the system date and time.Enter date to view the current system time.Modify time requires date-Functional character modified contentThe meanings of
Sometimes it is necessary to calculate the execution time of the command, which can be used, although the time command can be accurate to the millisecond level, but it is not possible to calculate the execution times of a heap of commands. You can
Time to modify Linux can use the date directiveThe function of the date command is to display and set the system date and time.Enter date to view the current system time.Modify time requires date-Functional character modified contentThe meanings of
Chapter Two, time management of LinuxLinux system generally exists two time, a Linux operating system time, the system time is affected by the operating system, the time may be inaccurate, but another real hardware time, that is, with button
Linux View current Time timezonelinux:~ # Datelinux:~ # Date–rlinux:~ # zdump-v/usr/share/zoneinfo/asia/beijing----view time zone statusLinux Modify time zonelinux:~ # Tzselectlinux:~ # Cp/usr/share/zoneinfo/asia/beijing/etc/localtimelinux:~ #
1. fdisk creating a disk partition does not restart the system PartprobeUsing the Fdisk tool only writes partition information to disk, and if a MKFS disk partition is required to be able to read to/dev/sda*, the use of partprobe allows kernel to
Baidu a bit of date usage, summarized as follows:
direct display [[email protected] ~]# DateThu Oct 20:44:51 CST 2015
display date [[email protected] ~]# date +%f2015-10-22
display time [[email protected] ~]# date +%t20:46:50
==
How Linux modifies the timeAt the command line, enter:DateShow Current time Fri 3 14:15:16 CST 2007Date ' +%x%x 'Show Current Time August 03, 2009 14:15 00 secondsDate-sModify Time by stringCan only modify the date, do not modify the time, enter:
In a networked environment, it's a good practice to keep your Linux system time accurate. There are many services in the Linux system that require the right time to work properly under networking conditions.
Let's take a look at the commands you
Date command
The function of the date command is to display and set the system date and time.
The general format for this command is: date [options] Displays the time format (beginning with +, followed by formatting)
Date set time format
The
It is well known that Linux does not have a recycle Bin, some people are afraid to delete the wrong things (experienced Linux administrators rarely fan this error), individuals do not recommend the Recycle Bin, but should be to develop personal
One day, meet a problem, ask for one months of today. At first we used the Strtotime ("-1 month") function to evaluate, and found that there was a problem, the month length of the month is not the same as the calculation results are incorrect. For
When compiling the Linux kernel, we found the clock synchronization problem, the solution is as follows:
Find. -type F | Xargs-n 5 Touch or find./-name "*"-exec Touch {}/Make cleanMake
or modify the machine time:
[Host@localhost ~]$ sudo date-
FileName: date.inc.php3
Before you use these two functions, you must first convert the date or datetime to the timestamp type.
Such as:
$today =mktime (0,0,0,date ("M"), Date ("D"), Date ("Y"));
/**** simulate the DATEADD function in SQL Server ****
1. Use the system $RANDOM variables
fdipzone@ubuntu:~$ Echo $RANDOM
17617
The range of the $RANDOM is [0, 32767]
If you need to generate more than 32767 random numbers, you can do so in the following ways.
Example: Generating random numbers
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.