1

Suppose i have a FILETIME which has some value (which we can see by converting it to systemtime) when I am in timezone1. Suppose I changed my timezone to timezone2. Now I want to get the time in hours and minutes (format) which was in timezone1.

dvail
  • 381
  • 2
  • 12
Peter
  • 2,719
  • 4
  • 25
  • 55

1 Answers1

1

A simple way would be to convert it to system time then use SystemTimeToTzSpecificLocalTime to convert the time to a timezone specific time.

Necrolis
  • 25,836
  • 3
  • 63
  • 101
  • the problem is i dont have the older timezone , i can see that the FILETIME value even after changing the timezone is still same , but i cannot compare the hour minute and seconds of it due to change of timezone – Peter Nov 25 '11 at 09:41
  • some microseconds have changed so the value of two FILETIME is different, but i know the H::M will be same , so i need to verify that – Peter Nov 25 '11 at 09:43
  • @Peter: a file time starts from a constant base, so it should never change: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724290(v=vs.85).aspx – Necrolis Nov 25 '11 at 09:47
  • just assume that filetime1 has some value , after second change it beacame filetime2 and also the timezone has now changed, now as only seconds have changed , i would like to compare hour::minute time which should be same , i want to know how to do that – Peter Nov 25 '11 at 19:47