delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/30/12:25:29

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 30 Jan 2004 11:20:20 -0600
From: George Weaver <gweaver AT shaw DOT ca>
Subject: Setting date and time
To: Cygwin <cygwin AT cygwin DOT com>
Message-id: <008401c3e755$569270e0$6400a8c0@Dell4500>
MIME-version: 1.0
References: <013e01c3e05a$6e37e060$6400a8c0 AT Dell4500> <m37jzbtl2l DOT fsf AT conexa DOT fciencias DOT unam DOT mx> <002a01c3e66b$d39321b0$6400a8c0 AT Dell4500> <23862 DOT 1075394766 AT sss DOT pgh DOT pa DOT us> <00ac01c3e68d$4c2b9e10$6400a8c0 AT Dell4500> <24919 DOT 1075399207 AT sss DOT pgh DOT pa DOT us>

Hi All,

I am trying to resolve a problem using PostgreSQL that may have its roots in
Cygwin (see below).

I am running PostgreSQL version 7.3.2 on Windows XP using Cygwin  version
1.3.20.

Once the PostgreSQL postmaster has started, if I change the system date on
the PC, and query the database (Select current_date), the result I get is
the date on the system relative to when postmaster started as a service, not
the new date on the PC.  Am I missing something really obvious??

test=# select now();
            now
----------------------------
 2004-01-29 11:25:06.553-06
(1 row)

test=# \!
$ date
Thu Jan 29 11:25:09 CST 2004
$ date 01\25\2004
Sun Jan 25 20:04:00 CST 2004
$ date
Sun Jan 25 20:04:01 CST 2004
$ exit

test=# select now();
            now
----------------------------
 2004-01-29 11:25:34.032-06
(1 row)

Thanks for your consideration of this request for help.

George



----- Original Message ----- 
From: "Tom Lane" <tgl AT sss DOT pgh DOT pa DOT us>
To: "George Weaver" <gweaver AT shaw DOT ca>
Cc: "Manuel Sugawara" <masm AT fciencias DOT unam DOT mx>;
<pgsql-novice AT postgresql DOT org>
Sent: Thursday, January 29, 2004 12:00 PM
Subject: Re: [NOVICE] Setting date and time


> George Weaver <gweaver AT shaw DOT ca> writes:

> > >
> Hm, you're running PG under Cygwin then?  This must be a Cygwin issue.
> Postgres itself gets the time from the operating system at the start of
> each transaction, and it's going to believe whatever the Cygwin
> implementation of gettimeofday() tells it.
>
> regards, tom lane
>


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019