× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Fri, 25 Oct 2002, Mark A. Manske wrote:

> Ohh, thats gotta be a nasty API, but then again
> I can just imagine how ugly the date API's are.
> So if the API knows it, great, let the super
> geeks help out us mediocre geeks.

Not so bad, I don't think.  The example I posted takes a timestamp as an
argument and returns a char.  Maybe better would be to take a timestamp
and a char as arguments and return an error code if the timestamp couldn't
be converted (like *loval was passed in).  The service program would
probably do some small amount of work and then do the the RPG equivalent
of the following C code:

  time_t curtime;
  struct tm *curdate;

  curtime = time (NULL);
  curdate = localtime (&curtime);

This gives you the timezone adjusted time of the current time.  But if you
replace NULL with the time you really want then curdate will have the
timezone adjusted value.  Not too hard, now that I think about.  Time to
hack this together...

James Rich



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.