Time functions in gpc.pas

Frank Heckenbach frank at g-n-u.de
Tue Apr 1 20:10:39 CEST 2003


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

-- 
Frank Heckenbach, frank at g-n-u.de, http://fjf.gnu.de/, 7977168E
GPC To-Do list, latest features, fixed bugs:
http://www.gnu-pascal.de/todo.html
GPC download signing key: 51FF C1F0 1A77 C6C2 4482  4DDC 117A 9773 7F88 1707




More information about the Gpc mailing list