Based on the business needs, you need to implement the function as shown in the following figure:
1. If the year is set to be greater than the current year, you can set the month, day, and time;
2. If the year is set to less than the current year,
Since I wrote my blog, I have always felt too cumbersome, too troublesome, and easy to report errors and maintain. In addition, I think it is external, not from the perspective of components, after repeated consideration, I decided to change it,
How to set the current time for linux time zone synchronization ?, Linux time zone
Set the current time for linux time zone Synchronization
I. Time Zone
1. view the current time zone
Date-R
2. Modify the time zone
Method (1) tzselect
Method (2
Summary of common time operations in Python: Obtain the current time, time function, and application.
This example describes common time operations in Python. We will share this with you for your reference. The details are as follows:
We pilot a
IOS ------ get the current time and current timestamp, ios ------ current time
// Obtain the current time
+ (NSString *) getCurrentTimes {
NSDateFormatter * formatter = [[NSDateFormatter alloc] init];
// ---------- Set the format you want. The
Current absorption, pulling current output, and filling current output
Pulling is a leak, active output current, output current from the output port;
Fill is filled, passive input current, inbound from the output port;
The suction is the active
When we save the data into the database will probably use a script such as PHP to get a time to save to MySQL, in fact, MySQL can directly use the timestamp data type to implement the default type, the next look.Many times, in order to be simple, we
Many times, in order to be simple, we need to set the Time field to the current time when designing the datasheet. In MySQL, however, the default value cannot be used, that is, you cannot set a column, and the default value is now (). What about it?
Python uses the current time and random number to generate a unique number. python current time
This example describes how Python uses the current time and random number to generate a unique number. We will share this with you for your reference.
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.