1. https://docs.microsoft.com/de-de/window ... -file-time
Converting a time_t Value to a File Time
The time functions included in the C run-time use the time_t type to represent the number of seconds elapsed since midnight, January 1, 1970. The following example converts a time_t value to a file time, using the Int32x32To64 function (C+):

3. https://docs.microsoft.com/de-de/window ... rrent-time
Changing a File Time to the Current Time
The following example sets the last-write time for a file to the current system time using the SetFileTime function.
The NTFS file system stores time values in UTC format, so they are not affected by changes in time zone or daylight saving time. The FAT file system stores time values based on the local time of the computer.
The file must be opened with the CreateFile function using FILE_WRITE_ATTRIBUTES access.

#include <windows.h>
// SetFileToCurrentTime - sets last write time to current system time
// Return value - TRUE if successful, FALSE otherwise
// hFile - must be a valid file handle
BOOL SetFileToCurrentTime(HANDLE hFile)
{
FILETIME ft;
SYSTEMTIME st;
BOOL f;
GetSystemTime(&st); // Gets the current system time
SystemTimeToFileTime(&st, &ft); // Converts the current system time to file time format
f = SetFileTime(hFile, // Sets last-write time of the file
(LPFILETIME) NULL, // to the converted current system time
(LPFILETIME) NULL,
&ft);
return f;
}

5. https://docs.microsoft.com/de-de/window ... reatefilea
CreateFileA function
Creates or opens a file or I/O device. The most commonly used I/O devices are as follows: file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe. The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.
To perform this operation as a transacted operation, which results in a handle that can be used for transacted I/O, use the CreateFileTransacted function.

1. [url]https://docs.microsoft.com/de-de/windows/desktop/SysInfo/converting-a-time-t-value-to-a-file-time[/url]Converting a time_t Value to a File TimeThe time functions included in the C run-time use the time_t type to represent the number of seconds elapsed since midnight, January 1, 1970. The following example converts a time_t value to a file time, using the Int32x32To64 function (C+):[code]#include <windows.h>#include <time.h>

3. [url]https://docs.microsoft.com/de-de/windows/desktop/SysInfo/changing-a-file-time-to-the-current-time[/url]Changing a File Time to the Current TimeThe following example sets the last-write time for a file to the current system time using the [url=https://docs.microsoft.com/en-us/windows/desktop/api/FileAPI/nf-fileapi-setfiletime]SetFileTime[/url] function.The NTFS file system stores time values in UTC format, so they are not affected by changes in time zone or daylight saving time. The FAT file system stores time values based on the local time of the computer.The file must be opened with the [url=https://docs.microsoft.com/de-de/windows/desktop/api/fileapi/nf-fileapi-createfilea]CreateFile[/url] function using FILE_WRITE_ATTRIBUTES access.

[code]#include <windows.h>

// SetFileToCurrentTime - sets last write time to current system time// Return value - TRUE if successful, FALSE otherwise// hFile - must be a valid file handle

GetSystemTime(&st); // Gets the current system time SystemTimeToFileTime(&st, &ft); // Converts the current system time to file time format f = SetFileTime(hFile, // Sets last-write time of the file (LPFILETIME) NULL, // to the converted current system time (LPFILETIME) NULL, &ft);

return f;}[/code]

4. [url]https://docs.microsoft.com/en-us/windows/desktop/api/FileAPI/nf-fileapi-setfiletime[/url]SetFileTime functionSets the date and time that the specified file or directory was created, last accessed, or last modified.

5. [url]https://docs.microsoft.com/de-de/windows/desktop/api/fileapi/nf-fileapi-createfilea[/url]CreateFileA functionCreates or opens a file or I/O device. The most commonly used I/O devices are as follows: file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, and pipe. The function returns a handle that can be used to access the file or device for various types of I/O depending on the file or device and the flags and attributes specified.To perform this operation as a transacted operation, which results in a handle that can be used for transacted I/O, use the CreateFileTransacted function.

If the application does not need to change this information, set this parameter either to NULL or to a pointer to a FILETIME structure that has both the dwLowDateTime and dwHighDateTime members set to 0.

The system uses UTC internally. Therefore, when you call SetLocalTime, the system uses the current time zone information to perform the conversion, including the daylight saving time setting. Note that the system uses the daylight saving time setting of the current time, not the new time you are setting. Therefore, to ensure the correct result, call SetLocalTime a second time, now that the first call has updated the daylight saving time setting.

The system uses UTC internally. Therefore, when you call SetLocalTime, the system uses the current time zone information to perform the conversion, including the daylight saving time setting. Note that the system uses the daylight saving time setting of the current time, not the new time you are setting. Therefore, to ensure the correct result, call SetLocalTime a second time, now that the first call has updated the daylight saving time setting.[/quote]

[img]https://i.imgur.com/hIeLRKd.png[/img]hier wieder mal kompliziert ...[code];-------- saved at Dienstag, 4. Dezember 2018 18:19:31 --------------;;-------- https://autohotkey.com/boards/viewtopic.php?f=28&t=46997 ---;- modified= 20180910;- created = 20180910;- descript= show time e.g. 7-Countries / synchronize time / change time ( for test or if needed ( or if no internet-connection) );- DST = only calculate CET Central-European-Time;- https://www.timeanddate.com/time/dst/;- https://www.timeanddate.com/worldclock/;- https://www.science.co.il/language/Locale-codes.php;- https://autohotkey.com/boards/viewtopic.php?f=28&t=46997 ; ( UTC + 1 / CET - Central European Time - begin last sunday in octobre / e.g sun 2018-10-28 03:00>02:00 UTC 01:00); ( UTC + 2 / CEST - Central European SUMMER Time - begin last sunday in mars / e.g. sun 2018-03-25 02:00>03:00 UTC 01:00) ;- https://en.wikipedia.org/wiki/Summer_Time_in_Europe;- On 8 February 2018, the European Parliament voted to ask the European Commission to re-evaluate DST in Europe.;- On 31 August 2018, the European Commission announced that they, after a web query giving high support of not switching clock twice annually, intend to go ahead with a new directive. /*A formula which cn be used to calculate the beginning of European Summer Time is:Sunday (31 − ((((5 × y) ÷ 4) + 4) mod 7)) March at 01:00 UTCThe corresponding formula for the end of European Summer Time is:Sunday (31 − ((((5 × y) ÷ 4) + 1) mod 7)) October at 01:00 UTCwhere y is the year, and a mod b is b times the fractional part of a/b. These formulae are valid until 2099*/