In Linux, how does one convert NTFS time to FAT32 time?

Source: Internet
Author: User
In Linux, how does one convert NTFS time to FAT32 time-Linux general technology-Linux technology and application information? The following is a detailed description. In NTFS, the time is represented in 64-bit format. It starts from on January 1, 1600 and is measured in 100 nanoseconds. in FAT32, the time is complex, the time value of the FAT32 file is stored in a specific location of the Directory item, and the time value must be operated on in pairs and calculated starting from 1980. What should I do if windows APIs cannot be used in Linux? Let's take a rough look at the method.

The time function starts from 1970, so we use the gmtime function to first use win api to obtain the nanosecond value between 1600 00:00:00 and, and then convert it to the second value, use gmtime to obtain the representation value relative to 1970, and then perform bit processing to generate the FAT32 time value, which is stored in the directory item.
Related Article

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.