Hi,

I have dates/times in UTC, and need to convert them to New York time.
My pc is not based in new york, so I cannot use the local time.

So far I have found:
BOOL WINAPI SystemTimeToTzSpecificLocalTime(
__in LPTIME_ZONE_INFORMATION lpTimeZone,
__in LPSYSTEMTIME lpUniversalTime,
__out LPSYSTEMTIME lpLocalTime
);

lpTimeZone: A pointer to a TIME_ZONE_INFORMATION structure that specifies the time zone of interest.


Question: How do I populate the TIME_ZONE_INFORMATION structure so that the function puts the New York time into lpLocalTime??

Thanks,

Joel

Recommended Answers

All 2 Replies

NY local time = UTC - 5 or -4 (daylight saving time)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.