Thread

  1. When DST occurs

    Justin Clift <aa2@bigpond.net.au> — 2001-05-01T05:36:24Z

    Hi all,
    
    I'm trying to figure out how DST change times will affect a running database?
    
    For example, if I'm running a PostgreSQL 7.1 server through a DST changeover 
    period, how does the database handle this?
    
    Apparently linux automatically does some kind of update during the changeover 
    period, but does that transfer through to PostgreSQL?
    
    Or would the database need to be re-started?
    
    Or <etc> ?
    
    Need to find out this info, but the documentation doesn't appear to mention 
    anything about it, and the mailing list stuff I've read just directly talk 
    about this.
    
    Regards and best wishes,
    
    Justin Clift
    
    
  2. Re: When DST occurs

    Doug McNaught <doug@wireboard.com> — 2001-05-04T21:47:39Z

    Justin Clift <aa2@bigpond.net.au> writes:
    
    > Hi all,
    > 
    > I'm trying to figure out how DST change times will affect a running database?
    > 
    > For example, if I'm running a PostgreSQL 7.1 server through a DST changeover 
    > period, how does the database handle this?
    > 
    > Apparently linux automatically does some kind of update during the changeover 
    > period, but does that transfer through to PostgreSQL?
    
    Linux (and Unix in general) and PostgreSQL both store times in UTC,
    which is independent of timezones and DST.  The C library translates
    UTC into a local printable time, taking timezone and DST into account
    as needed.  So things "just work" and you don't usually have to do
    anything special for the DST changeover. 
    
    -Doug
    -- 
    The rain man gave me two cures; he said jump right in,
    The first was Texas medicine--the second was just railroad gin,
    And like a fool I mixed them, and it strangled up my mind,
    Now people just get uglier, and I got no sense of time...          --Dylan
    
    
  3. Re: When DST occurs

    Tom Lane <tgl@sss.pgh.pa.us> — 2001-05-04T23:03:53Z

    Justin Clift <aa2@bigpond.net.au> writes:
    > I'm trying to figure out how DST change times will affect a running database?
    
    The usual theory in Unix-based software is to keep everything in GMT
    internally, so the data isn't affected at all by timezone changes.
    Timezone just affects display of timestamp values.
    
    			regards, tom lane