filetime

Modifying the date and time values using SYSTEMTIME, FILETIME, and ULARGE_INTEGER

北战南征 提交于 2019-12-05 03:28:06
I am making a program, in C++ using Visual Studio 2005, that needs to create a watermark with the time on a set of images. These images are taken from a video that were processed at certain time intervals. What I am trying to do is to modify the time on each image through SYSTEMTIME. I looked at the MSDN and it says not to modify the values within SYSTEMTIME itself, but to convert it into a FILETIME and then an ULARGE_INTEGER. My question is how is the ULARGE_INTEGER split up? Is the HighPart the date and the Low Part the time and if that's the case how to I take into account rollover? Like if

API to set file timestamps in OS X

有些话、适合烂在心里 提交于 2019-12-04 17:52:54
I want to (bidirectionally) synchronize files between a PC (Win7, NTFS) and a Mac (OS X, HFS+). I have tried using a lot of existing tools / methods (Unison, SyncToy or other software working over Samba shares etc.) but none of them are able to preserve the file creation timestamps (hence-forward referred to as FCTs) on my files, which is unacceptable to me. Unison doesn't understand the notion of FCTs, perhaps because it was primarily built with Unix in mind (See my Unison forum post ) Windows cannot get (or set) the FCTs when accessing SMB shares served by OS X. In such scenario, it shows

c++ \\ Convert FILETIME to seconds

ⅰ亾dé卋堺 提交于 2019-12-04 12:35:44
How can I convert FILETIME to seconds? I need to compare two FILETIME objects.. I found this , but seems like it doesn't do the trick... ULARGE_INTEGER ull; ull.LowPart = lastWriteTimeLow1; ull.HighPart = lastWriteTimeHigh1; time_t lastModified = ull.QuadPart / 10000000ULL - 11644473600ULL; ULARGE_INTEGER xxx; xxx.LowPart = currentTimeLow1; xxx.HighPart = currentTimeHigh1; time_t current = xxx.QuadPart / 10000000ULL - 11644473600ULL; unsigned long SecondsInterval = current - lastModified; if (SecondsInterval > RequiredSecondsFromNow) return true; return false; I compared to 2 FILETIME and

Datetime to filetime (Python)

萝らか妹 提交于 2019-11-29 14:53:18
Any links for me to convert datetime to filetime using python? Example: 13 Apr 2011 07:21:01.0874 (UTC) FILETIME=[57D8C920:01CBF9AB] Got the above from an email header. I found this link, which seems to describe what you are looking for: http://reliablybroken.com/b/2009/09/working-with-active-directory-filetime-values-in-python/ My answer in duplicated question got deleted, so I'll post here: Surfing around i found this link: http://cboard.cprogramming.com/windows-programming/85330-hex-time-filetime.html After that, everything become simple: >>> ft = "57D8C920:01CBF9AB" ... # switch parts ...

not being able to convert from FILETIME (windows time) to dateTime ( I get a different date )

吃可爱长大的小学妹 提交于 2019-11-29 09:29:59
问题 Most of the files I read get the right time when using the following method to convert: // works great most of the time private static DateTime convertToDateTime(System.Runtime.InteropServices.ComTypes.FILETIME time) { long highBits = time.dwHighDateTime; highBits = highBits << 32; return DateTime.FromFileTimeUtc(highBits + time.dwLowDateTime); } Here I have an example in visual studio to show how this method sometimes does not work for example I will show the actual file in my computer and

Convert Unix/Linux time to Windows FILETIME

梦想与她 提交于 2019-11-29 07:53:26
I am once again going from Windows to Linux, I have to port a function from Windows to Linux that calculates NTP time. Seems simple but the format is in Windows FILETIME format. I sort of have an idea what the differences are but so far I can not correctly convert my Linux time to the windows filetime format. Does anyone have any ideas on how to do this? I have seen some articles on how to do this but they all use win32 functions and I can't use them! I can post the windows code if this makes no sense, thanks. They also take the current time and subtract it from January 1st 1900 to get the

Does the windows FILETIME structure include leap seconds?

雨燕双飞 提交于 2019-11-28 11:56:01
The FILETIME structure counts from January 1 1601 (presumably the start of that day) according to the Microsoft documentation, but does this include leap seconds? Ian Boyd The question shouldn't be if FILETIME includes leap seconds. It should be: Do the people, functions, and libraries, who interpret a FILETIME (i.e. FileTimeToSystemTime ) include leap seconds when counting the duration? The simple answer is "no" . FileTimeToSystemTime returns seconds as 0..59 . The simpler answer is: " of course not, how could it? ". My Windows 2000 machine doesn't know that there were 2 leap seconds added in

Datetime to filetime (Python)

人走茶凉 提交于 2019-11-28 08:52:53
问题 Any links for me to convert datetime to filetime using python? Example: 13 Apr 2011 07:21:01.0874 (UTC) FILETIME=[57D8C920:01CBF9AB] Got the above from an email header. 回答1: I found this link, which seems to describe what you are looking for: http://reliablybroken.com/b/2009/09/working-with-active-directory-filetime-values-in-python/ 回答2: My answer in duplicated question got deleted, so I'll post here: Surfing around i found this link: http://cboard.cprogramming.com/windows-programming/85330

Convert Unix/Linux time to Windows FILETIME

北慕城南 提交于 2019-11-28 01:29:43
问题 I am once again going from Windows to Linux, I have to port a function from Windows to Linux that calculates NTP time. Seems simple but the format is in Windows FILETIME format. I sort of have an idea what the differences are but so far I can not correctly convert my Linux time to the windows filetime format. Does anyone have any ideas on how to do this? I have seen some articles on how to do this but they all use win32 functions and I can't use them! I can post the windows code if this makes

Does the windows FILETIME structure include leap seconds?

删除回忆录丶 提交于 2019-11-27 06:36:48
问题 The FILETIME structure counts from January 1 1601 (presumably the start of that day) according to the Microsoft documentation, but does this include leap seconds? 回答1: The question shouldn't be if FILETIME includes leap seconds. It should be: Do the people, functions, and libraries, who interpret a FILETIME (i.e. FileTimeToSystemTime ) include leap seconds when counting the duration? The simple answer is "no" . FileTimeToSystemTime returns seconds as 0..59 . The simpler answer is: " of course