Board index » cppbuilder » Y2K problem

Y2K problem


2003-07-14 05:44:30 AM
cppbuilder53
Hi,
I had to reinstall BC5.02 on my hard disk.
After installation of the patches BC52P1.EXE and BC5Y2K, I still have a Y2K
problem with TTime and TDate.
Any solution would be appreciated. Thanks in advance.
Regards
Raoul
 
 

Re:Y2K problem

Hi,
I had to reinstall BC5.02 on my hard disk.
After installation of the patches BC52P1.EXE and BC5Y2K.EXE, I still have a
Y2K problem with TTime and TDate.
Any solution would be appreciated. Thanks in advance.
Regards
Raoul
 

Re:Y2K problem

You need to rebuild the OWL library after installing the Y2K patched sources
files.
Regards,
Bruce
 

{smallsort}

Re:Y2K problem

Sorry, I thought it may be a common problem. My problem looks like
following:
Following source:
TTime today; /* For current time. Same problem with TTime today =
TTime() */
MessageBox(today.AsString().c_str(), "Test");
displays the wrong time and date:
December 18, 2008 2:07:35 pm
Remark: Windows clock shows we are still in 2003.
Following source:
TTime today(TDate(1, 9, 2003), 12, 0, 0);
MessageBox(today.AsString().c_str(), "Test");
displays the correct time and date:
September 9, 2003 12:00:00 pm
Thanks in advance
Regards
Raoul
"Wayne A. King" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
Quote
On Sun, 13 Jul 2003 23:44:30 +0200, "Raoul Kieffer"
< XXXX@XXXXX.COM >wrote:

>I still have a Y2K problem with TTime and TDate.
>Any solution would be appreciated.

Not likely anyone will offer a solution unless you first
describe the problem.

--
Wayne A. King
( XXXX@XXXXX.COM , XXXX@XXXXX.COM ,
XXXX@XXXXX.COM , XXXX@XXXXX.COM )
 

Re:Y2K problem

Thanks Bruce,
I'm not quite sure what you mean by "rebuild the OWL library".
I went to the menu <Project><Build all>, but my problem remains.
See description in answer to "Wayne A. King".
Regards
Raoul
" Bruce Salzman" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
Quote
You need to rebuild the OWL library after installing the Y2K patched
sources
files.

Regards,
Bruce


 

Re:Y2K problem

Raoul Kieffer wrote:
Quote
Following source:
TTime today; /* For current time. Same problem with TTime today =
TTime() */
MessageBox(today.AsString().c_str(), "Test");
displays the wrong time and date:
December 18, 2008 2:07:35 pm
Remark: Windows clock shows we are still in 2003.

Following source:
TTime today(TDate(1, 9, 2003), 12, 0, 0);
MessageBox(today.AsString().c_str(), "Test");
displays the correct time and date:
September 9, 2003 12:00:00 pm
I've never worked with TTime but it seems to me that it's likely working
as expected. From other postings I've seen, your first example, "TTime
today;" only declares a variable but does not assign it memory nor a
value. (or was that 'allocates memory but not a value') I suspect if
you'd used something like, "TTime today = new TTime;" then you'd
probably get today's date by default. My suggestion would be to read
the help on TTime carefully specifically any examples provided.
ps. if TTime is implemented in any fashion like Unix dates then the
'wrong date/time' listed seems awfully close to the clock roll-over
point; Unix's own version of Y2K. Perhaps 2008/12/18 14h07 is an
internal clock value of zeros. (wild speculation on my part)
---------->signature = 5 lines follows <--------------
Neil Duffee, Joe Systems Guy, U d'Ottawa, Ottawa, Ont, Canada
telephone:1 613 562 5800 x4585 fax:1 613 562 5161
mailto:NDuffee at uottawa.ca aix1.uottawa.ca/~nduffee
"How *do* you plan for something like that?" Guardian Bob, Reboot
"For every action, there is an equal and opposite criticism."
 

Re:Y2K problem

Thanks Neil,
I don't think it is an "internal clock value of zeros" as this wrong value
is incremented every seconds.
I just noticed that:
TTime today = TTime() + (TTime(TDate(14, 6, 2003), 21, 7, 0).Seconds() -
TTime(TDate(14, 6, 103), 21, 7, 0).Seconds());
Generates the correct time and date. Is it possible to get it in an easier
way?
Regards
Raoul
"Neil Duffee" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
Quote
Raoul Kieffer wrote:
>Following source:
>TTime today; /* For current time. Same problem with TTime today =
>TTime() */
>MessageBox(today.AsString().c_str(), "Test");
>displays the wrong time and date:
>December 18, 2008 2:07:35 pm
>Remark: Windows clock shows we are still in 2003.
>
>Following source:
>TTime today(TDate(1, 9, 2003), 12, 0, 0);
>MessageBox(today.AsString().c_str(), "Test");
>displays the correct time and date:
>September 9, 2003 12:00:00 pm

I've never worked with TTime but it seems to me that it's likely working
as expected. From other postings I've seen, your first example, "TTime
today;" only declares a variable but does not assign it memory nor a
value. (or was that 'allocates memory but not a value') I suspect if
you'd used something like, "TTime today = new TTime;" then you'd
probably get today's date by default. My suggestion would be to read
the help on TTime carefully specifically any examples provided.

ps. if TTime is implemented in any fashion like Unix dates then the
'wrong date/time' listed seems awfully close to the clock roll-over
point; Unix's own version of Y2K. Perhaps 2008/12/18 14h07 is an
internal clock value of zeros. (wild speculation on my part)
---------->signature = 5 lines follows <--------------
Neil Duffee, Joe Systems Guy, U d'Ottawa, Ottawa, Ont, Canada
telephone:1 613 562 5800 x4585 fax:1 613 562 5161
mailto:NDuffee at uottawa.ca aix1.uottawa.ca/~nduffee
"How *do* you plan for something like that?" Guardian Bob, Reboot
"For every action, there is an equal and opposite criticism."
 

Re:Y2K problem

"Raoul Kieffer" < XXXX@XXXXX.COM >wrote in message
Quote
Thanks Bruce,
I'm not quite sure what you mean by "rebuild the OWL library".
I went to the menu <Project><Build all>, but my problem remains.
Hello, Raoul
Sorry, for misleading you--it is actually the class library BDS52.DLL (or
BDS52T.DLL if multi-threaded) that needs to be rebuilt. After installing the
updated source files (date.cpp and time.cpp, as I recall), run the BUILD.BAT
file located in the BC5\SOURCE\CLASSLIB folder. You might want to edit this
file and change the line
set BIDSVER=501
to
set BIDSVER=502
This will create new class library dlls. Copy them into the BC5\BIN folder
to replace the old ones. Then re-link your program.
HTH,
Bruce
 

Re:Y2K problem

Thousands of thanks Bruce,
this solved my problem.
Best regards
Raoul
" Bruce Salzman" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
Quote

"Raoul Kieffer" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>Thanks Bruce,
>I'm not quite sure what you mean by "rebuild the OWL library".
>I went to the menu <Project><Build all>, but my problem remains.

Hello, Raoul

Sorry, for misleading you--it is actually the class library BDS52.DLL (or
BDS52T.DLL if multi-threaded) that needs to be rebuilt. After installing
the
updated source files (date.cpp and time.cpp, as I recall), run the
BUILD.BAT
file located in the BC5\SOURCE\CLASSLIB folder. You might want to edit
this
file and change the line
set BIDSVER=501
to
set BIDSVER=502
This will create new class library dlls. Copy them into the BC5\BIN folder
to replace the old ones. Then re-link your program.

HTH,
Bruce


 

Re:Y2K problem

"Raoul Kieffer" < XXXX@XXXXX.COM >wrote in message
Quote
Hi,

I had to reinstall BC5.02 on my hard disk.
After installation of the patches BC52P1.EXE and BC5Y2K.EXE, I still have
a
Y2K problem with TTime and TDate.

Any solution would be appreciated. Thanks in advance.
Are you using XP ??
Indi
 

Re:Y2K problem

Hello,
Just reading this thread - I am hoping to run 5.02 on XP soon.
Please tell me what do I need to know ?
D.
"Indi" < XXXX@XXXXX.COM >wrote in message
Quote

"Raoul Kieffer" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>Hi,
>
>I had to reinstall BC5.02 on my hard disk.
>After installation of the patches BC52P1.EXE and BC5Y2K.EXE, I still
have
a
>Y2K problem with TTime and TDate.
>
>Any solution would be appreciated. Thanks in advance.

Are you using XP ??

Indi