JewcalGetCurrentTimeForLocation

The JewcalGetCurrentTimeForLocation function takes the current time, either passed as a parameter or via the system clock, and calculates the current time in winter clock at a location contained in CITIES.TXT.

DWORD JewcalGetCurrentTimeForLocation(LPJEWCALTIMESTRUCT lpCurrentTimeLocal,
                                      int iCurrentTimeLocalGMTOffset,
                                      LPSTR lpLocation, 
                                      LPSTR lpCitiesFileName,
                                      LPJEWCALTIMESTRUCT lpReturnTimeAtLocation);

Parameters

lpCurrentTimeLocal
If it is non-NULL, it must point to a time structure which specifies the current time to take. If it is NULL, the current system time returned by the Windows API function GetSystemTime is used.

iCurrentTimeLocalGMTOffset
If lpCurrentTimeLocal is non-NULL, it must contain the GMT offset of the time in lpCurrentTimeLocal. When the passed time is summer clock, one hour has to be added.
For example, if the time in lpCurrentTimeLocal is local to winter clock in Germany (GMT+1), iCurrentTimeLocalGMTOffset must contain 1, and in case of summer clock, iCurrentTimeLocalGMTOffset must contain 2.
If lpCurrentTimeLocal is NULL, this parameter is ignored.

lpLocation
Must point to the name of the city which must be present in the cities definitions file specified by lpCitiesFileName

lpCitiesFileName
If it is not NULL, it must contain the filename with full path of the CITIES.TXT file where the cities definitions are contained. If it is NULL, the default CITIES.TXT file is used which must be present in the same directory where the JEWCAL.DLL is located. File format of CITIES.TXT

lpReturnCurrentTimeLocal
Must point to a JEWCALTIMESTRUCT structure whose cbSize member contains the value sizeof(JEWCALTIMESTRUCT) and which will contain the returned time in winter clock.

Return values

If the function succeeds, the return value is JEWCAL_ERROR_OK.

If the function fails, the return value is other than JEWCAL_ERROR_OK. The function fails if the cbSize member of the JEWCALTIMESTRUCT structure is not sizeof(JEWCALTIMESTRUCT), the lpLocation or lpReturnTimeAtLocation is a NULL pointer or if the city in lpLocation cannot be found.

Remarks

This function is new in version 1.1

See Also

JEWCALTIMESTRUCT