Skip to content

Implement LocalFileTimeToFileTime#766

Closed
antonic901 wants to merge 1 commit into
XboxDev:masterfrom
antonic901:localfiletime-to-filetime
Closed

Implement LocalFileTimeToFileTime#766
antonic901 wants to merge 1 commit into
XboxDev:masterfrom
antonic901:localfiletime-to-filetime

Conversation

@antonic901
Copy link
Copy Markdown

This should be reverse of FileTimeToLocalFileTime, so here is imlpementation.

Comment thread lib/winapi/timezoneapi.c Outdated
localFileTime.LowPart = lpLocalFileTime->dwLowDateTime;
localFileTime.HighPart = lpLocalFileTime->dwHighDateTime;

// Adjust the file time by the timezone offset. This function does not account for DST.
Copy link
Copy Markdown
Contributor

@Ryzee119 Ryzee119 Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment doesnt apply to LocalFileTimeToFileTime

See MSDocs https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-localfiletimetofiletime
LocalFileTimeToFileTime uses the current settings for the time zone and daylight saving time. Therefore, if it is daylight saving time, this function will take daylight saving time into account, even if the time you are converting is in standard time.

@Ryzee119
Copy link
Copy Markdown
Contributor

Generally our commit name convention is winapi: Reason can you change the commit title?

@antonic901 antonic901 changed the title Implement LocalFileTimeToFileTime winapi: Implement LocalFileTimeToFileTime Feb 23, 2026
@antonic901 antonic901 force-pushed the localfiletime-to-filetime branch from a680aa4 to 33c5723 Compare February 23, 2026 14:54
@antonic901 antonic901 changed the title winapi: Implement LocalFileTimeToFileTime Implement LocalFileTimeToFileTime Feb 23, 2026
@antonic901 antonic901 force-pushed the localfiletime-to-filetime branch from 33c5723 to 77706e6 Compare February 23, 2026 14:55
@antonic901
Copy link
Copy Markdown
Author

Update commit with proper message.

Removed that comment.

@antonic901 antonic901 closed this by deleting the head repository Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants