Skip to content
Snippets Groups Projects
  1. Dec 23, 1997
  2. Oct 25, 1997
  3. Oct 09, 1997
  4. Sep 16, 1997
  5. Sep 08, 1997
  6. Sep 07, 1997
  7. Aug 19, 1997
  8. Jul 28, 1997
  9. Jul 01, 1997
  10. May 11, 1997
  11. Apr 03, 1997
    • Marc G. Fournier's avatar
      From: "D'Arcy J.M. Cain" <darcy@druid.net> · 4bc578eb
      Marc G. Fournier authored
      Subject: [HACKERS] timestamp.c changes
      
      I sent in changes previously and they were rejected because they didn't
      follow ANSI spec.  Here is the input part of the changes again.  Even
      though it allows more flexibility for inputting different formats, it
      is also backwards compatible with the standard version.  I have also
      not changed the output format so it will still output the ANSI forms.
      Is this acceptable to everyone?
      4bc578eb
  12. Apr 02, 1997
    • Marc G. Fournier's avatar
      From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov> · 2ab34dfe
      Marc G. Fournier authored
      Subject: [HACKERS] More date time functions
      
      Here are some additional patches mostly related to the date and time
      data types. It includes some type conversion routines to move between
      the different date types and some other date manipulation routines such
      as date_part(units,datetime).
      
      I noticed Edmund Mergl et al's neat trick for getting function overloading
      for builtin functions, so started to use that for the date and time stuff.
      Later, if someone figures out how to get function overloading directly
      for internal C code, then we can move to that technique.
      
      These patches include documentation updates (don't faint!) for the built-in
      man page. Doesn't yet include mention of timestamp, since I don't know
      much about it and since it may change a bit to become a _real_ ANSI timestamp
      which would include parser support for the declaration syntax (what do you
      think, Dan?).
      
      The patches were developed on the 970330 release, but have been rebuilt
      off of the 970402 release. The first patch below is to get libpq to compile,
      on my Linux box, but is not related to the rest of the patches and you can
      choose not to apply that one at this time. Thanks in advance, scrappy!
      2ab34dfe
  13. Mar 25, 1997
    • Marc G. Fournier's avatar
      From: "D'Arcy J.M. Cain" <darcy@druid.net> · 07038148
      Marc G. Fournier authored
      Subject: [HACKERS] backend/utils/adt/timestamp.c
      
      Back to this timezone stuff.  The struct tm has a field (tm_gmtoff) which
      is the offset from UTC (GMT is archaic BTW) in seconds.  Is this the
      value you are looking for when you use timezone?  Note that this applies
      to NetBSD but it does not appear to be in either ANSI C or POSIX.  This
      looks like one of those things that is just going to have to be hand
      coded for each platform.
      
      Why not just store the values in UTC and use localtime instead of
      gmtime when retrieving the value?
      
      Also, you assume the time is returned as a 4 byte integer.  In fact,
      there is not even any requirement that time be an integral value.  You
      should use time_t here.
      
      The input function seems unduly restrictive.  Somewhere in the sources
      there is an input function that allows words for months.  Can't we do
      the same here?
      
      There is a standard function, difftime, for subtracting two times.  It
      deals with cases where time_t is not integral.  There is, however, a
      small performance hit since it returns a double and I don't believe
      there is any system currently which uses anything but an integral for
      time_t.  Still, this is technically the correct and portable thing to do.
      
      The returns from the various comparisons should probably be a bool.
      07038148
  14. Mar 14, 1997
Loading