|
From: | Xypron |
Subject: | Re: [Help-glpk] Time conversion functions |
Date: | Thu, 20 Nov 2008 01:13:50 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.18) Gecko/20081030 SeaMonkey/1.1.13 |
Andrew Makhorin wrote:
Xypron, Thank you for your efforts. I will try to summarize our proposals and prepare some more or less detailed description of all new built-in functions to be added to the language. It will take several days, I hope. BTW, do you know how this feature is implemented in AMPL? I could not find anything in the internet. Andrew Makhorin
Hello Andrew, I found the following in Robert Fourer, Ampl: A Modeling Language for Mathematical Programming, 2002 p 458, Table A2: Build-in arithmetic functions ctime() - current time as string ctime(t) - time t as string time - current time in seconds Further information can be found at http://www.netlib.org/ampl/looping/NEW_CMDS ctime() = ctime(time()) = current time, a string formatted as in # 'Sat Jul 27 23:37:43 1996' # time() = current time in seconds (numeric) # from a system-dependent origin, shown by # ctime(0) (often 1 January 1970 GMT).Time formats differ vastly. Hence I guest implementing a function which allow to parse many different formats is crucial. This is why I used a second parameter to specify the format. The time format provided by AMPL does not conform with ISO 8601 and might therefore not be usable for further processing.
Best regards Xypron
[Prev in Thread] | Current Thread | [Next in Thread] |