Re: Problem with SQL TODAY
Posted in 1996
Gordon E. Hooker wrote:
>
> chaiw@ibm.net (Chaiw Kok Kee) wrote:
>
> >I wonder if anybody can help me. I'm running ESQL-C on a client access
> >Informix On-Line 5.07 on another Unix Server. The following SQL, whether in
> >ESQL-C or DBACCESS returns yesterday instead of the system date.
> >
> > $select inv_date
> > into $jdate
> > where inv_date = TODAY;
> >
>
> I this may be a stupid question, but did you check the system date on the system
> machine. Maybe your clock is not set correctly.
>
> >Running Query Language using dbaccess has the same problem but running isql on
> >the server (where the database resides) yields the correct result. I think
> >there might be a problem with inet.
> >
> >I would appreciate if anybody can share there experience.
> >
>
> _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
> Gordon E. Hooker MACS PCP
> 25 Clarke Street Ripley Queensland Australia
> Phone 61-7-32940555
> Email gordonh@thehub.com.au
> _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
> We are just two lost souls living in a fish bowl
> Year after year
>
> Pink Floyd
If the system date is correct, start checking TIMEZONE...
It will vary depending upon your flavor of Unix, BUT
$TIMEZONE, $TZ are both popular environment variables used by unix...
If that's not your timezone, look in /etc/zoneinfo or some such
nonsense.