Date Processing Algorithm for auto-disable or delete accounts when serv-u expires

Source: Internet
Author: User

 

The serv-u time is calculated in seconds.

86400 seconds in a day

For example

In serv-u, 2009-1-1 1-1 is described as: 1230739200.

Is described in serv-u as: 1261670400

Time Difference: 358 days

TimeSpan ce = DateTime. Now. Date-new DateTime (2009, 1, 1 );
Int ceDays = ce. Days;
// (1230739200 + 86400*(365 + ceDays) // the end time of a year.

There are some discrepancies, but they are all for reference and some tips.

The role is very clear. It is used to operate FTP.

-------------------------- A friend may say that it is better to directly find the corresponding value of a day, but he cannot find the corresponding function conversion in a rush, so he has to use this method instead. The results are the same. You can set the date by yourself.

Then provide the corresponding base for several dates

2010-1-1 1-1: 1262275200

1-1: 1420041600

 

 

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.