Thread

  1. 6.8.5: Location of CURRENT_DATE unclear

    Curt Sampson <cjs@cynic.net> — 2003-04-10T02:44:19Z

    In table 6-18 the 7.3 documentation, it describes the CURRENT_DATE
    function as returning "today's date." Section 6.8.4 mentions
    CURRENT_DATE again, but does not describe what location is used to
    determine the current date. Does this return the current date as of now,
    UTC, or the current date in the local timezone?
    
    cjs
    -- 
    Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org
        Don't you know, in this new Dark Age, we're all light.  --XTC
    
    
    
  2. Re: 6.8.5: Location of CURRENT_DATE unclear

    Tom Lane <tgl@sss.pgh.pa.us> — 2003-04-11T20:34:14Z

    Curt Sampson <cjs@cynic.net> writes:
    > In table 6-18 the 7.3 documentation, it describes the CURRENT_DATE
    > function as returning "today's date." Section 6.8.4 mentions
    > CURRENT_DATE again, but does not describe what location is used to
    > determine the current date. Does this return the current date as of now,
    > UTC, or the current date in the local timezone?
    
    The latter, as you could easily have found by experiment.
    
    regression=# show timezone;
     TimeZone
    ----------
     EST5EDT
    (1 row)
    
    regression=# select now(), current_date;
                 now              |    date
    ------------------------------+------------
     2003-04-11 16:32:59.84755-04 | 2003-04-11
    (1 row)
    
    regression=# set timezone to 'JST-9';
    SET
    regression=# select now(), current_date;
                  now              |    date
    -------------------------------+------------
     2003-04-12 05:33:19.119802+09 | 2003-04-12
    (1 row)
    
    
    			regards, tom lane
    
    
    
  3. Re: 6.8.5: Location of CURRENT_DATE unclear

    Curt Sampson <cjs@cynic.net> — 2003-04-12T03:42:09Z

    On Fri, 11 Apr 2003, Tom Lane wrote:
    
    > Curt Sampson <cjs@cynic.net> writes:
    > > In table 6-18 the 7.3 documentation, it describes the CURRENT_DATE
    > > function as returning "today's date." Section 6.8.4 mentions
    > > CURRENT_DATE again, but does not describe what location is used to
    > > determine the current date. Does this return the current date as of now,
    > > UTC, or the current date in the local timezone?
    >
    > The latter, as you could easily have found by experiment.
    
    In fact, I did find that out by experiment. My real question, I guess,
    is "is there some good reason not to have this information in the
    documentation?" (In fact, I'm sure the answer is "no," so more the real
    question is, "Is my whinging enough to get someone to add it, or do I
    have to get off my lazy ass and submit a patch?")
    
    cjs
    -- 
    Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org
        Don't you know, in this new Dark Age, we're all light.  --XTC
    
    
    
  4. Re: 6.8.5: Location of CURRENT_DATE unclear

    Tom Lane <tgl@sss.pgh.pa.us> — 2003-04-12T04:16:18Z

    Curt Sampson <cjs@cynic.net> writes:
    > On Fri, 11 Apr 2003, Tom Lane wrote:
    >> The latter, as you could easily have found by experiment.
    
    > In fact, I did find that out by experiment. My real question, I guess,
    > is "is there some good reason not to have this information in the
    > documentation?" (In fact, I'm sure the answer is "no,"
    
    Certainly.
    
    > so more the real
    > question is, "Is my whinging enough to get someone to add it, or do I
    > have to get off my lazy ass and submit a patch?")
    
    If you submit a doc patch, it'll get done ;-).
    
    Seriously, the docs are all too much written by people who already knew
    the answers.  I like doc patches from people who found something out the
    hard way, because they tend to put the info where they expected to find
    it --- which isn't necessarily where the original developer thought to
    document it, but *is* likely to be where other users would look.
    
    			regards, tom lane