Emil Jerabek wrote:
On Tue, Apr 01, 2003 at 05:15:28PM +0200, Markus Gerwinski wrote:
Hi folks,
does somebody know a way to get the TimeZone from the system? In gpc.pas, the procedure UnitTimeToTime wants it as a parameter, so I want to fill in a reasonable value.
Besides, the function expects parameters named DST, TZName1, and TZName2. Can somebody tell me what they mean and how to find reasonable values for them?
There are fields with the same name in the TimeStamp record, i.e. use can obtain reasonable values for them from GetTimeStamp. However, they are _output_ parameters of UnixTimeToTime, so you don't need to worry about them at all.
In fact, as the comment says, all parameters except Time may be Null (if you don't care for them).
(It seems to me that `function UnixTimeToTime (T: UnixTimeType): TimeStamp' would be a more clear interface.)
Something like UnixTimeToTimeStamp?
DST means Daylight Saving Time. TZName{1,2} are apparently names of the time zone (as strings), but I've no idea why there are two of them.
Without and with DST.
Eike Lange wrote:
TimeZone is the number of seconds west from Greenwich.
No, east. (See the recent discussion.)
Frank