[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Time conversion functions

From: Andrew Makhorin
Subject: Re: [Help-glpk] Time conversion functions
Date: Fri, 21 Nov 2008 11:15:57 +0300

Hi Xypron,

> please, find in the appendix a description of the functions that I
> implemented, which cover most of the whishis mailed in this thread.


Two things I would like to avoid are day-light saving time and
UTC/local time. That is, the idea is to interpret the calendar time
just as the number of seconds elapsed since 1970-01-01 00:00:00
not defining whether it is UTC or local time. In fact, it is always
possible to define the timezone offset in the model to translate
between UTC and local time, if necessary.

> A special function tmfunc is not needed, it is just part of the
> conversion of time to string.
> Thats exactly what in my implementation functions gmtime() and
> localtime() offer.
> param year := gmtime(t, "%d"); ...

Unclear. As I understand gmtime returns a symbolic value (character
string) suitable for printing while tmfunc returns a numeric value
suitable for arithmetic calculations.

Probably it would be reasonable to add two functions atoi and atod to
convert symbolic values to numeric ones.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]