1. Euphoria and Year 2000

Hi,

Since in my job I'm in charge of create some test cases related to Y2K , I
wonder if Euphoria has any problem respect to this. I mean Euhporia
interpreter or programs written in Euphoria.

Thanks,

Maurizio


---------------------------------------------------------
Maurizio Moroni
Omnitel Pronto Italia SpA
Network Testing Dept.

Via Bensi, 12/9
20152 Milano (Italy)
Tel +39-2-41432102
GSM +39-347-2270291
e-mail : maurizio.moroni at omnitel.it
---------------------------------------------------------

---------------------------------------------------------
Maurizio Moroni
Omnitel Pronto Italia SpA
Network Testing Dept.

Via Bensi, 12/9
20152 Milano (Italy)
Tel +39-2-41432102
GSM +39-347-2270291
e-mail : maurizio.moroni at omnitel.it
---------------------------------------------------------

new topic     » topic index » view message » categorize

2. Re: Euphoria and Year 2000

Maurizio MORONI writes:
> Since in my job I'm in charge of create some test cases
> related to Y2K , I wonder if Euphoria has any problem
> respect to this. I mean Euphoria interpreter or
> programs written in Euphoria.

There are two library routines that return dates:
dir() and date().

dir() returns full 4-digit file dates.
date() returns "the number of years since 1900",
*not* just the last 2 digits of the year. In the year 2000
date() will return 100 for the year, *not* 0. You should
always add 1900 to get the year.
See comments in LIBRARY.DOC / date().

My machine booted-up one time with the year set to
2098 rather than 1998. The DOS DIR command
showed only the last 2 digits of the year so I went
along for a few days without detecting any problem,
except that one application (not written in Euphoria)
kept crashing.

Eventually I ran a Euphoria program (top.ex from
"extra stuff from RDS" on the Archive page). It showed
the year on the most recently updated files
on my system as "2098". This
surprised me and I eventually figured out what had
happened. After correcting the system date back to 1998
the application started working again (a program to
upload files to CompuServe).

You can (stupidly) write a program in any language that will
only use the last 2 digits of the year, but at least
in Euphoria you can retrieve the full year and avoid the
year 2000 problem fairly easily.

As a test, you can set the date on your system temporarily
to the year 2000. Then create "junk.ex" in an empty directory
(it will have a file date of year 2000) and run:

-- junk.ex:
include file.e
puts(1, "dir is:\n")
? dir(".")
puts(1, "date is:\n")
? date()

Do it in an empty directory so the output from dir() will
be small. You should see "2000" in the dir() output and
"100" in the date() output.

Regards,
     Rob Craig
     Rapid Deployment Software

new topic     » goto parent     » topic index » view message » categorize

3. Re: Euphoria and Year 2000

On Tue, 12 May 1998, Robert Craig wrote:

> My machine booted-up one time with the year set to
> 2098 rather than 1998. The DOS DIR command
> showed only the last 2 digits of the year so I went
> along for a few days without detecting any problem,
> except that one application (not written in Euphoria)
> kept crashing.

I've had this. First I thought it was a virus, then I correlated it with
whenever I accidentally connected a Floppy Controller Cable or IDE cable
the wrong way round in my PC. Seems the BIOS didn't like the feedback. I
ran checks, no permanent damage was done...

Anyways, since this _post_ is 100% offtopic, I'll throw in a blatant plug
for PROM.BAT on my DOS page, it's basically a prompt based Screen title
bar, and uses ANSI.SYS. Every time a command is executed, the time, date
and Dos version appear at the top of the screen. So I know at a glance
whether something odd has happened to the date or time.

Get it from me via e-mail (it's very small), or from my DOS webpage.

--
Carl R White
E-mail...: cyrek- at -bigfoot.com              / Remove the hyphens before
Finger...: crwhite- at -dcsun1.comp.brad.ac.uk \ mailing or fingering...
Url......: http://www.bigfoot.com/~cyrek/

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu