Board index » delphi » Anyone having a time problem today?

Anyone having a time problem today?

At a few of our customers' sites we are having a problem since the start of
daylight savings time where the "now" date literal is returning standard
time even though the OS (Windows NT) is configured correctly and and the
operating system reports the correct time.

E.g.:
    Windows NT is set up for US Eastern, Automatically adjust for daylight
savings time, current time = 13:00.
    13:00 appears in the icon tray.
    At a command prompt, the "time" returns 13:00
    The following stored procedure returns 12:00 (in ISQL you have to turn
on BasicSettings|Show Time Datatype):

        create procedure get_server_time returns (servertime date)
        as begin
            servertime = "now";
        end

OS is Windows NT4 (waiting to find out what service pack, but probably 6)
Interbase 5.6

Is anyone else having this problem?  Our customers have been using Interbase
for three years and this problem has never occurred before.  It is also not
occurring at all sites.

Thanks,
Pat

 

Re:Anyone having a time problem today?


Quote
Pat Coffer wrote:

> At a few of our customers' sites we are having a problem since the start of
> daylight savings time where the "now" date literal is returning standard
> time even though the OS (Windows NT) is configured correctly and and the
> operating system reports the correct time.

        FWIW, I just tried:

select cast('now' as date) from rdb$database

        ...against a 5.6 server running on NT 4 and got the correct time.

        -Craig

--
Craig Stuntz (TeamB)       Senior Developer, Vertex Systems Corp.
Delphi/InterBase weblog:   http://delphi.weblogs.com
Use Borland servers; posts via others are not seen by TeamB.
For more info, see http://www.borland.com/newsgroups/genl_faqs.html

Re:Anyone having a time problem today?


It works on every machine I've tried also.  But the problem exists at
several locations in the field.  I see a business trip in my future...

"Craig Stuntz (TeamB)" <cstuntz@no_spam.vertexsoftware.com> wrote in message
news:3AC8E1C2.968553EA@no_spam.vertexsoftware.com...

Quote

> Pat Coffer wrote:

> > At a few of our customers' sites we are having a problem since the start
of
> > daylight savings time where the "now" date literal is returning standard
> > time even though the OS (Windows NT) is configured correctly and and the
> > operating system reports the correct time.

> FWIW, I just tried:

> select cast('now' as date) from rdb$database

> ...against a 5.6 server running on NT 4 and got the correct time.

> -Craig

> --
> Craig Stuntz (TeamB)       Senior Developer, Vertex Systems Corp.
> Delphi/InterBase weblog:   http://delphi.weblogs.com
> Use Borland servers; posts via others are not seen by TeamB.
> For more info, see http://www.borland.com/newsgroups/genl_faqs.html

Re:Anyone having a time problem today?


Yes, I am having this problem as well here at our office.  I am running
Interbase 4.2 on a NT4 sp6 server.  The server is showing the correct time
and time zone (Central Daylight Time), but a simple query like

select cast("now" as date) from any_table

returns the time one hour behind.  We did not have this problem last year.
I'm wondering if it is some kind of belated Y2K bug?

Quote
"Pat Coffer" <pcoff...@flash.net> wrote in message news:3ac8c48f_2@dnews...
> At a few of our customers' sites we are having a problem since the start
of
> daylight savings time where the "now" date literal is returning standard
> time even though the OS (Windows NT) is configured correctly and and the
> operating system reports the correct time.

> E.g.:
>     Windows NT is set up for US Eastern, Automatically adjust for daylight
> savings time, current time = 13:00.
>     13:00 appears in the icon tray.
>     At a command prompt, the "time" returns 13:00
>     The following stored procedure returns 12:00 (in ISQL you have to turn
> on BasicSettings|Show Time Datatype):

>         create procedure get_server_time returns (servertime date)
>         as begin
>             servertime = "now";
>         end

> OS is Windows NT4 (waiting to find out what service pack, but probably 6)
> Interbase 5.6

> Is anyone else having this problem?  Our customers have been using
Interbase
> for three years and this problem has never occurred before.  It is also
not
> occurring at all sites.

> Thanks,
> Pat

Re:Anyone having a time problem today?


Dave,

Thanks for replying.  I'm trying to figure out what is going on and I'll let
you know if I do.  It is happening 3000 miles away, so I'm having a hard
time.  Could you let me know if you figure it out?

I'm suspecting a service pack problem.  This machine has only had SP6
installed since the last time change.

Could Borland maybe let us know which API function Interbase uses (in IB5.6
for me and IB4.2 for Dave) to get the time?  Is it GetLocalTime() or
GetSystemTime() followed by an adjustment for the local time zone?

Quote
"Dave Dutcher" <ddutc...@symbology.com> wrote in message

news:9acr5v$fuq$1@linux.mers.com...
Quote
> Yes, I am having this problem as well here at our office.  I am running
> Interbase 4.2 on a NT4 sp6 server.  The server is showing the correct time
> and time zone (Central Daylight Time), but a simple query like

> select cast("now" as date) from any_table

> returns the time one hour behind.  We did not have this problem last year.
> I'm wondering if it is some kind of belated Y2K bug?

> "Pat Coffer" <pcoff...@flash.net> wrote in message

news:3ac8c48f_2@dnews...
Quote
> > At a few of our customers' sites we are having a problem since the start
> of
> > daylight savings time where the "now" date literal is returning standard
> > time even though the OS (Windows NT) is configured correctly and and the
> > operating system reports the correct time.

> > E.g.:
> >     Windows NT is set up for US Eastern, Automatically adjust for
daylight
> > savings time, current time = 13:00.
> >     13:00 appears in the icon tray.
> >     At a command prompt, the "time" returns 13:00
> >     The following stored procedure returns 12:00 (in ISQL you have to
turn
> > on BasicSettings|Show Time Datatype):

> >         create procedure get_server_time returns (servertime date)
> >         as begin
> >             servertime = "now";
> >         end

> > OS is Windows NT4 (waiting to find out what service pack, but probably
6)
> > Interbase 5.6

> > Is anyone else having this problem?  Our customers have been using
> Interbase
> > for three years and this problem has never occurred before.  It is also
> not
> > occurring at all sites.

> > Thanks,
> > Pat

Re:Anyone having a time problem today?


Quote
Pat Coffer wrote in message <3ac8c48f_2@dnews>...
>At a few of our customers' sites we are having a problem since the
start of
>daylight savings time where the "now" date literal is returning
standard
>time even though the OS (Windows NT) is configured correctly and and
the
>operating system reports the correct time.

Yes! I have one site so far that has reported this problem. On startup,
our app tries to sync the client machine to the time on the server and
it was getting set one hour less.

--
Wayne Niddery (WinWright Inc.)
RADBooks - http://members.home.net/wniddery/RADBooks/delphibooks.html
"At the apex of every great tragedy of mankind there stands the figure
of an incorruptible altruist" - Ayn Rand

Re:Anyone having a time problem today?


Thanks to all those who replied.  I've confirmed the bug and have a
solution.

The C runtime library version 5.x has a bug in it in which it incorrectly
calculates the beginning date for daylight savings time when daylight
savings time falls on April 1.  Version 6.x of the C runtime does not have
this bug.

Interbase 5.6 installs version 5.00.7303 of the C runtime, overwriting any
version that previously exists, even though the existing runtime may be
newer.  This problem will not occur on W2K because of the Windows File
Protection feature in W2K that replaces system files that are overwritten by
rude installers.

To solve the problem, overwrite your MSVCRT.DLL with version 6.x.  I've
tried 6.0.8397 and 6.0.8337 and they both solved the problem.  There may be
other versions that solve the problem as well.

Re:Anyone having a time problem today?


Thanks very much for the followup.

Quote
Pat Coffer wrote in message <3acb4836_2@dnews>...

>The C runtime library version 5.x has a bug in it in which it
incorrectly
>calculates the beginning date for daylight savings time when daylight
>savings time falls on April 1.  Version 6.x of the C runtime does not
have
>this bug.

>Interbase 5.6 installs version 5.00.7303 of the C runtime, overwriting
any
>version that previously exists, even though the existing runtime may be
>newer.  This problem will not occur on W2K because of the Windows File
>Protection feature in W2K that replaces system files that are
overwritten by
>rude installers.

>To solve the problem, overwrite your MSVCRT.DLL with version 6.x.  I've
>tried 6.0.8397 and 6.0.8337 and they both solved the problem.  There
may be
>other versions that solve the problem as well.

--
Wayne Niddery (WinWright Inc.)
RADBooks - http://members.home.net/wniddery/RADBooks/delphibooks.html
"At the apex of every great tragedy of mankind there stands the figure
of an incorruptible altruist" - Ayn Rand

Other Threads