+---------------------------------------------------------------+ 
|                           Y2KWA.COM                           | 
|                          Version 2.1                          | 
|                                                               | 
|     W O R K - A R O U N D   F O R   T H E   Y-2-K   B U G     | 
|                                                               | 
|                         7 July, 1999                          |
+---------------------------------------------------------------+

      Some   CMOS  will  not work well with  years  beyond  1999.   
They   "stick" on a bad year which is determined by their date of  
manufacture.   When the operating system reboots after   December  
31,  1999, it will "catch" this bad year from CMOS.  You can  re-
set  the  date  manually and be ok for the time being;  but,  the  
next   time  you  re-boot your computer CMOS will revert to  it's 
problem  year  and  start the process all over again.  This could 
contribute  to  the destruction or misuse of date sensitive  data 
used by software  running on the system.

     Up  to  now,  the word has been that there  is  no  software  
solution for this particular strain of the y2k bug.  One has  had  
to buy a new BIOS chip, if it is available, or else a new mother- 
board or some other hardware answer.  At any rate, such solutions  
represent a disappointing expense. 

     Of  course,  one can work around this bug by  adjusting  the  
AUTOEXEC.BAT  file  to invoke the DATE command and let  you,  the  
operator, enter the correct date on every boot-up before anything  
else runs.  But, now it pleases me to present an inexpensive  and  
much more convenient option - Y2KWA.

     In   a  conversation with my very dear and wise  Dad   about 
this  problem not  too  long  ago, he said something that got  my 
neurons all fired up: "How does anyone know what year it is  when 
they  get   up   in the morning?"  That simple  question  got  me 
thinking about how to  get  the  computer to make an educated and 
accurate  judgment of the correct  year.  I think the  result  of 
this idea is a very appealing alternative  to the above mentioned 
solutions.  I will let you  render  your own opinion.

     The basis for Y2KWA is the fact that some, if not all  these  
infected CMOS still keep the correct month and day despite  their  
trouble with the year. The following explains:

     Y2KWA should run at startup, preferably as the first command  
in the AUTOEXEC.BAT file.  

     It   reads a reference file telling it the day,  month,  and 
year   it  recorded the last time it ran.  It then  compares  the 
saved   month  with what the system took from CMOS.  If the  CMOS 
month  is greater  than the saved month (i.e. August  is  greater 
than  July)  then  it assumes the actual year is the same as  the 
saved  year.   On the  other  hand,  if  the CMOS month  is  less  
than  the  saved  month  (January is less than December)  then it 
assumes  the  year changed  since the last boot-up  so  that  the 
current year equals the  saved  year plus one.

     After  making  a decision according to the  above  criteria,   
Y2KWA displays the date it will pass to the system and allows the  
user   a   few seconds, which can be adjusted  in   the   command  
line, to abort the operation.  If no interference from the opera-
tor occurs the program resets the system date,  updates the  date  
reference file, and terminates.


LEAP-DAY CONFLICTS:

===================
     An unavoidable consideration is the very rare occasion where  
the CMOS  stick-year  and the actual year disagree  on   leapness  
and  there has been a transition from February to March since the 
last   boot-up.   In  the case where CMOS says the year  is  leap  
but   it   really   is not, CMOS could insert an  extra  day  and  
throw  things  off.   In the case where CMOS sticks on a non-leap 
year  and  the  actual  year  is leap, then we could fail to have  
the   leap   day  worked  in  where it belongs.  Again,  this  is  
fairly   rare.  The  first  case  would  have an occurrence  fre-
quency   of   about   only  3/1463  boots, if  one  re-boots  his 
computer once a day,  and  the  second case one third as much.

     For the moment, given the nature of Y2KWA, it does not  seem 
possible  to automatically handle the above situation  with  100% 
security.   However,  Y2KWA does do a very good job  of  handling 
this  conflict.   It  has two possible  approaches.   The  safest 
approach,  the  default mode, is for Y2KWA to  pause  processing,  
allowing  the  operator to input the correct date.  This  happens 
when there is a conflict between the leapness  of  the  CMOS year 
and the year Y2KWA computes to be the actual  year  and the saved 
reference month is some time earlier than  March  while the  CMOS 
month is March or greater or when CMOS presents the date February 
29  when Y2KWA calculates it is not actually a leap  year.  Y2KWA 
then "knows" that  the  dangerous transition has occurred.   This 
mode I have called Leap-day Conflict Trapping.

     There  is another approach: Special Leap-day  Conflict  Han-
dling.   It  is invoked with a command line  argument.   In  this 
mode,  Y2KWA will take its best shot at calculating  the  correct 
date  and  automatically  set the date without  halting.   It  is 
nearly 100% accurate but things can go wrong.  The biggest  weak-
ness would be if one were to re-boot the computer more than  once 
on  February 29 in this mode.  The first time, it would be  accu-
rate,  the  next time it would be a day off.   Such  a  situation 
could  occur,  for example, on a power failure or  on  a  lap-top 
computer which may be turned on and off several times a day.


WHAT PROBLEMS COULD Y2KWA CAUSE?
================================
     Y2KWA's strength lies largely in the fact that a computer is  
generally  rebooted many times in the course of a year.  If  more  
than a year were to pass between re-boots then Y2KWA would be off  
by a year or more on the next boot-up.  But this seems an unlike-
ly situation for a computer whose services are in demand.

     Are there computers that run continually and are  programmed  
to  re-boot themselves automatically in the absence of an  opera-
tor;  and,  are said computers used to run  crucial  applications  
with time sensitive data?  If so, there would be a problem on the  
leap  day transitions described above.  Y2KWA  would either  halt  
the  system  at boot-time and suspend all  operations  until  the  
operator set things straight.  Or, if you have it set on  Special 
Leap-day Conflict Handling, and there was a power failure and the 
power  returns, Y2KWA could allow the system to run  with a  date 
of  March  1st, when it is really February 29.   Again,  for  the 
majority of PC users this  does  not seem a likely scenario.  

     There  is another potential for trouble, the most  likely  I  
think.   It would be in the situation where the user  runs  Y2KWA  
and  experiments  with different date settings to see  how  Y2KWA  
functions,  but does not make sure  to re-set  Y2KWA's  reference  
file before quitting.  In that case, the next time it ran,  Y2KWA  
would  set the computer's year to whatever was the last year  the  
user  experimented with or one higher.  To avoid this, run  Y2KWA  

one last time after experimenting.  When it starts the count-down  
press  the  [Esc] key to get the  options  menu.   Then  you  can 
chose the Enter new date option.  Y2KWA  will  then  update  it's 
reference file to the date you then set.

      Obviously,   Y2KWA  does not totally  exterminate  the  y2k  
bug;    otherwise,  I would have named it Y2KFIX.  What  we  have 
here is  a  sensible,  convenient  and  inexpensive way to   work  
around  the  problem.  


HOW DO I GET Y2KWA WORKING ON MY COMPUTER?
==========================================
     Y2KWA21.ZIP  contains this file you read now, UPDATES.TXT  a 
list of changes since version 1.0,  and  Y2KWA.COM,  the   actual  
program.

     Copy Y2KWA.COM to your root directory.  

     Using a text editor like EDIT or NOTEPAD, edit your  AUTOEX- 
EC.BAT file.  As the very FIRST line possible put Y2KWA, save the  
file and exit.  

     Now,  at the command prompt, enter y2kwa and press  [Enter].   
Running  for the first time it will halt, telling you it can  not  
open  its reference file.  This is because it hasn't created  one  
yet.   It  will prompt you to enter the current date.   When  you  
have  done  so, choose the option to let Y2KWA set the  date.  It 
will then  create its  file for future reference.

     Certain  command line options give the user a little  flexi-
bility.  For example, issuing this command:

                             Y2KWA 1

will  cause  it  to run with a one second  count-down.   Using  a  
different  number like 60 gives it a one minute count-down.   The  
default  is  12  seconds.  By the way, you  can  press  just  the  
[Break]  key during the count-down and it will  pause.   Striking  
the same key again will let the count-down finish.

     The command:

                             Y2KWA L

will  cause Y2KWA run without halting for the  leap-day  conflict 
issue.  It will do a good job of determining the correct day  but 
remember,  it is not perfect. If there is a case where  Y2KWA  is 
forced  to enter a wrong date you get it  back  on track by  run-
ning Y2KWA again and manually re-setting the date.  

     You can combine the command arguments too.

                            Y2KWA L1

would cause it to use Special Leap-day Conflict Handling as  well 
as  forsake  the count-down.  Using this mode means you are  very 
confident in Y2KWA's leap-day conflict handling, your  electrical 
supply  and that someone like the janitor will  not  accidentally 
switch  off  your computer on 29 February, or that it is  no  big 
deal to you if your computer is off by a day on rare occasions.

     Again,  you  could install Y2KWA in your  AUTOEXEC.BAT  file  
with the command line arguments you prefer.  

     Finally entering something like:


                             Y2KWA H

       (or anything besides L,l or a number for that matter)

will  cause Y2KWA to display a little list of these command  line  
options in case you forgot what they were and did not want to  go  
hunting for this file.

     On  termination, Y2KWA passes error level one to the  system  
when  it terminates on it's own but error level zero if the  user  
aborts Y2KWA manually.


UPGRADING FROM Y2KWA v1.x:
==========================
     Previous  versions  used  a different format  for  the  date 
reference  file.   The first time Y2KWA runs it may  get  garbage 
information.   To avoid this, delete any existing Y2KWA.REF  from 
the  directory  from which Y2KWA runs.  This should  not  pose  a 
serious  problem.   If you forget, you will probably just  get  a 
strange date from Y2KWA which can easily be corrected by entering 
a new date.


HOW MUCH DOES Y2KWA COST?
=========================
     Y2KWA is freeware.  I wrote it to use in my computer and was 
so  pleased with the results that the only way it could  make  me 
happier  is  if otheres benefitted by it.  This  program  may  be 
freely distributed along with the other files in its original zip 
file Y2KWAXXX.ZIP where XXX is the version number.


WHERE TO GET THE LATEST VERSION:
================================
     The official site for Y2KWA is:

           http://bcordero.home.sprynet.com/y2kwa.html

There you may download the latest version.


SPECIAL THANKS:
===============
     The  first  release date of Y2KWA was May  17,  1999.   That 
issue  was not as user friendly as the current version and,  more 
importantly,  not nearly as smart when it comes to handling leap-
day conflicts.  My sincerest thanks go to Andreas Bergstrom of:

                HTTP://home.halden.net/abergstr/

for  contributing  excellent  suggestions that  helped  make  the 
current version so much better on both counts.

     If you have any  suggestions on how to improve this  program 
or if you find any bugs in it I certainly would be glad to   hear 
from you.  Give this program the best shake down you can and  let  
me  know  what you think.  Especially would I  be  interested  in  
input from programmers.

     Sincerely:

     Bruce Cordero                     
     bcordero@mcimail.com

