Re: [Mono-list] Mono 0.28 - Still fails under windows 2000 P

2003-10-05 Thread Varga Zoltan

   Hi,

  Could somebody who is experiencing this problem run the
attached
test program and send me the results ?

   thanks

Zoltan



Paul Paximadis <[EMAIL PROTECTED]> írta:

> I have just installed latest version on mono for Windows (
> mono-0.28-win32-1.exe ) and I still get an error trying to
compile
> simple Hello application.
> 
> ** ERROR **: file icall.c: line
>
3145(ves_icall_System_CurrentTimeZone_GetTimeZoneData):assertion
failed
> (err) abrting..
> 
> This is now displayed in a messagebox.
> 
> I thought there was a bug fix for this?
> 
> Is anydoby elese getting this or am I doing something wrong ?
> 
> Thankss
> Paul
> ___
> Mono-list maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> 
> 

#include 

void main ()
{
TIME_ZONE_INFORMATION tz_info;
FILETIME ft;
int i, err;

err = GetTimeZoneInformation (&tz_info);  

printf ("RES: %d %s %d %d.\n", err, tz_info.StandardName, 
TIME_ZONE_ID_STANDARD, TIME_ZONE_ID_DAYLIGHT);

printf ("DATA: %d %d %d %d.\n", tz_info.StandardDate.wYear, 
tz_info.StandardDate.wMonth, tz_info.StandardDate.wDayOfWeek, 
tz_info.StandardDate.wDay);

tz_info.StandardDate.wYear = 2003;
err = SystemTimeToFileTime (&tz_info.StandardDate, &ft);
if (!err) {
  printf ("FAILED: %d.\n", GetLastError ());
}   
}


Re: [Mono-list] Mono 0.28 - Still fails under windows 2000 P

2003-10-05 Thread Atsushi Eno
Hello,

After applying attached patch, this problem looks gone away.
But I don't know it might break this method.

Atsushi Eno

Index: icall.c
===
RCS file: /cvs/public/mono/mono/metadata/icall.c,v
retrieving revision 1.339
diff -u -r1.339 icall.c
--- icall.c 26 Sep 2003 16:25:40 -  1.339
+++ icall.c 5 Oct 2003 14:44:47 -
@@ -3141,10 +3141,14 @@
mono_array_set ((*names), gpointer, 0, mono_string_new_utf16 (domain, 
tz_info.StandardName, i));
 
tz_info.StandardDate.wYear = year;
+   tz_info.StandardDate.wMonth = 1;
+   tz_info.StandardDate.wDay = 1;
err = SystemTimeToFileTime (&tz_info.StandardDate, &ft);
g_assert (err);
mono_array_set ((*data), gint64, 1, ((guint64)ft.dwHighDateTime<<32) | 
ft.dwLowDateTime);
tz_info.DaylightDate.wYear = year;
+   tz_info.DaylightDate.wMonth = 1;
+   tz_info.DaylightDate.wDay = 1;
err = SystemTimeToFileTime (&tz_info.DaylightDate, &ft);
g_assert (err);
mono_array_set ((*data), gint64, 0, ((guint64)ft.dwHighDateTime<<32) | 
ft.dwLowDateTime);


[Mono-list] resyncing code

2003-10-05 Thread Reggie Burnett
Trying to resync my driver code with Mono and I had a couple questions:

1. After updating the ByteFX.Data.dll.sources file, issuing make from my
folder gives:  ../../build/deps/ByteFX.Data.dll.makefrag:38: *** missing
separator. Stop.  
2. My provider includes SWF dialogs and bitmap resources for editors that
support that.  Can Mono handle these at this point or should I compile them
out? 

Reggie


___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Modify XML Docs

2003-10-05 Thread Pablo Fischer
Hi!

Im creating an app (mBloggy, to post 'posts' to a blog), however I'm
going to use a xml file to save the user configuration (the blogs).
Today I can write (JUST new files), read it and identify some parts, but
I dont undestand what the inet says about modifying xml files, so How
can I modify an xml file? to modify nodes and remove elements, for
example:


 
  Pablo
  Crypted
  Personal WebSite
  http://pablo.com.mx/xmlrpc.php
 
   
... the same..
  


Thanks!
-- 
Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx)
http://www.pablo.com.mx
http://www.debianmexico.org
GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C
Firma URL: http://www.pablo.com.mx/firmagpg.txt

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] resyncing code

2003-10-05 Thread Gonzalo Paniagua Javier
El dom, 05-10-2003 a las 17:12, Reggie Burnett escribió:
> Trying to resync my driver code with Mono and I had a couple questions:
> 
> 1. After updating the ByteFX.Data.dll.sources file, issuing make from my
> folder gives:  ../../build/deps/ByteFX.Data.dll.makefrag:38: *** missing
> separator. Stop.  

Are there any conflicts when you run cvs up? Did you update *.sources
with new/removed files?

-Gonzalo


___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] resyncing code

2003-10-05 Thread Reggie Burnett
I haven't tried to do a cvs up.  I edited the .sources file and added the
new files that are in the project.  There may be files in the folders that
should not be included. 

I have deleted the makefrag file and now it is telling me there are no rules
for making a .stamp file.  

Reggie

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:mono-list-
> [EMAIL PROTECTED] On Behalf Of Gonzalo Paniagua Javier
> Sent: Sunday, October 05, 2003 1:13 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Mono-list] resyncing code
> 
> El dom, 05-10-2003 a las 17:12, Reggie Burnett escribió:
> > Trying to resync my driver code with Mono and I had a couple questions:
> >
> > 1. After updating the ByteFX.Data.dll.sources file, issuing make from my
> > folder gives:  ../../build/deps/ByteFX.Data.dll.makefrag:38: *** missing
> > separator. Stop.
> 
> Are there any conflicts when you run cvs up? Did you update *.sources
> with new/removed files?
> 
> -Gonzalo
> 
> 
> ___
> Mono-list maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Modify XML Docs

2003-10-05 Thread Martin Willemoes Hansen




On Sun, 2003-10-05 at 20:04, Pablo Fischer wrote:

Hi!

Im creating an app (mBloggy, to post 'posts' to a blog), however I'm
going to use a xml file to save the user configuration (the blogs).
Today I can write (JUST new files), read it and identify some parts, but
I dont undestand what the inet says about modifying xml files, so How
can I modify an xml file? to modify nodes and remove elements, for
example:


 
  Pablo
  Crypted
  Personal WebSite
  http://pablo.com.mx/xmlrpc.php
 
 	
	... the same..
  



Will it be free software I can download some day? .. Im looking for some good bloging software you see.

Happy hacking


Thanks!




-- 
Martin Willemoes Hansen


E-Mail	[EMAIL PROTECTED]	Website	mwh.sysrq.dk
IRC MWH, freenode.net
   









Re: [Mono-list] Modify XML Docs

2003-10-05 Thread Pablo Fischer
El dom, 05-10-2003 a las 13:28, Martin Willemoes Hansen escribió:
> Will it be free software I can download some day? .. Im looking for
> some good bloging software you see.
Of course it will be free!, I think im in the 80% of the app, Im just in
the 'user configuration' part and the 'format text' (bold, italics,
underline, bla bla).

But today I can 'talk' with the xmlrpc file in my server and post
messages.

> 
> Happy hacking
> 
> > Thanks!
> 
> -- 
> Martin Willemoes Hansen
> 
> 
> E-Mail[EMAIL PROTECTED]   Website mwh.sysrq.dk
> IRC MWH, freenode.net
>    
-- 
Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx)
http://www.pablo.com.mx
http://www.debianmexico.org
GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C
Firma URL: http://www.pablo.com.mx/firmagpg.txt


___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Modify XML Docs

2003-10-05 Thread Miguel de Icaza
Hello,

> Im creating an app (mBloggy, to post 'posts' to a blog), however I'm
> going to use a xml file to save the user configuration (the blogs).
> Today I can write (JUST new files), read it and identify some parts, but
> I dont undestand what the inet says about modifying xml files, so How
> can I modify an xml file? to modify nodes and remove elements, for
> example:
> 
> 
>  
>   Pablo
>   Crypted
>   Personal WebSite
>   http://pablo.com.mx/xmlrpc.php
>  
>  
>   ... the same..
>   
> 

This sounds like a prime candidate for XmlSerialization, use:

public class mbloggy {
public Account [] accounts;
}

public class account {
public string username;
public string password;
public string identifier;
public string url;
}

mbloggy m = new mbloggy ();
account a = new Account;
m.accounts = new Account [1];
m.accounts [0] = a;
a.username = "Miguel";
a.identifier = "...";

XmlSerializer s = new XmlSerializer (typeof (mbloggy));
s.Serialize (Console.Out, m);

Miguel
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Modify XML Docs

2003-10-05 Thread Pablo Fischer
Hello Miguel!

Well Im creating something like that, cause I'm loading the xmlfile
(LoadConfigFile) in a struct like this:

  private struct ConfigInfo {
string username;
string password;
string url;
string identifier;
  }

So if the file exists I 'load' the file in a struct

ConfigInfo[] configtmp = new ConfigInfo[node_username.Count];

And then start 'saving' the xml data in the struct. 

Once I have the configtmp loaded I just use it every time I need some
information. But what happens if the user wants to remove an account or
modify something (like the password), how can I save that to my xml
file?

Thanks!

El dom, 05-10-2003 a las 13:38, Miguel de Icaza escribió:
> Hello,
> This sounds like a prime candidate for XmlSerialization, use:
> 
> public class mbloggy {
>   public Account [] accounts;
> }
> 
> public class account {
>   public string username;
>   public string password;
>   public string identifier;
>   public string url;
> }
> 
> mbloggy m = new mbloggy ();
> account a = new Account;
> m.accounts = new Account [1];
> m.accounts [0] = a;
> a.username = "Miguel";
> a.identifier = "...";
> 
> XmlSerializer s = new XmlSerializer (typeof (mbloggy));
> s.Serialize (Console.Out, m);
> 
> Miguel
-- 
Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx)
http://www.pablo.com.mx
http://www.debianmexico.org
GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C
Firma URL: http://www.pablo.com.mx/firmagpg.txt

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono 0.28 - Still fails under windows 2000 P

2003-10-05 Thread Varga Zoltan

 Hi,

  I checked in a fix for these problems. I hope it is is
correct. I tested
it by setting the timezone to GMT (i.e. no dayling saving). 

The patch is the following:

<<<
Index: icall.c
===
RCS file: /cvs/public/mono/mono/metadata/icall.c,v
retrieving revision 1.339
diff -u -3 -p -r1.339 icall.c
--- icall.c 26 Sep 2003 16:25:40 -  1.339
+++ icall.c 5 Oct 2003 15:08:17 -
@@ -3121,9 +3121,11 @@ ves_icall_System_CurrentTimeZone_GetTime
TIME_ZONE_INFORMATION tz_info;
FILETIME ft;
int i;
-   int err;
+   int err, tz_id;

-   GetTimeZoneInformation (&tz_info);
+   tz_id = GetTimeZoneInformation (&tz_info);
+   if (tz_id == TIME_ZONE_ID_INVALID)
+   return 0;
 
MONO_CHECK_ARG_NULL (data);
MONO_CHECK_ARG_NULL (names);
@@ -3139,6 +3141,19 @@ ves_icall_System_CurrentTimeZone_GetTime
if (!tz_info.StandardName [i])
break;
mono_array_set ((*names), gpointer, 0,
mono_string_new_utf16 (domain, tz_info.StandardName, i));
+
+   if ((year <= 1601) || (year > 30827)) {
+   /*
+* According to MSDN, the MS time functions can't handle
dates outside
+* this interval.
+*/
+   return 1;
+   }
+
+   if (tz_id == TIME_ZONE_ID_UNKNOWN) {
+   /* No daylight saving in this time zone */
+   return 1;
+   }
 
tz_info.StandardDate.wYear = year;
err = SystemTimeToFileTime (&tz_info.StandardDate, &ft);
<<

Could somebody who is actually seeing this problem test it
and see
if it fixes the problem? If it is, then we can make a new
windows release
with only this patch.

  bye

  Zoltan



Atsushi Eno <[EMAIL PROTECTED]> írta:

> Hello,
> 
> After applying attached patch, this problem looks gone away.
> But I don't know it might break this method.
> 
> Atsushi Eno
> 
> 




___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono 0.28 - Still fails under windows 2000 P

2003-10-05 Thread Atsushi Eno
Varga Zoltan wrote:
> Could somebody who is actually seeing this problem test it
> and see
> if it fixes the problem? If it is, then we can make a new
> windows release
> with only this patch.

It looks fine for me. Thanks for fixing it.

Atsushi Eno


___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Modify XML Docs

2003-10-05 Thread Ben Maurer
On Sun, 2003-10-05 at 14:52, Pablo Fischer wrote:
> Hello Miguel!
> 
> Well Im creating something like that, cause I'm loading the xmlfile
> (LoadConfigFile) in a struct like this:
> 
>   private struct ConfigInfo {
>   string username;
>   string password;
>   string url;
>   string identifier;
>   }
> 
> So if the file exists I 'load' the file in a struct
> 
> ConfigInfo[] configtmp = new ConfigInfo[node_username.Count];
> 
> And then start 'saving' the xml data in the struct. 
> 
> Once I have the configtmp loaded I just use it every time I need some
> information. But what happens if the user wants to remove an account
You can use an array list so you can add/remove accounts (see the msdn
docs)
>  or
> modify something (like the password)
you can modify the information
> , how can I save that to my xml
> file?
Reserialize it. Read the msdn docs.

As well, both monologue and monodoc have some examples of Xml
Serialization, you may want to check them out.

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Modify XML Docs

2003-10-05 Thread Pablo Fischer
Hi!

Ok, I'll check the xml serialization, however the configuration NEEDS to
be saved in a file, not in 'the fly', so every change to the accounts
needs to be saved to the file (and then to the array, an array list or a
struct array).

Thanks!
El dom, 05-10-2003 a las 14:44, Ben Maurer escribió:
> You can use an array list so you can add/remove accounts (see the msdn
> docs)
> >  or
> > modify something (like the password)
> you can modify the information
> > , how can I save that to my xml
> > file?
> Reserialize it. Read the msdn docs.
> 
> As well, both monologue and monodoc have some examples of Xml
> Serialization, you may want to check them out.
> 
> ___
> Mono-list maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
-- 
Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx)
http://www.pablo.com.mx
http://www.debianmexico.org
GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C
Firma URL: http://www.pablo.com.mx/firmagpg.txt

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Modify XML Docs (part 2)

2003-10-05 Thread Pablo Fischer
Uhm.. 

After sending the last reply I think in that option.. 

1. Load the xml file like you and Miguel says
2. Work in the array list with add/remove
3. After closing the app (delete_event), creates the new xml file

Is it a good idea?

Thanks!
El dom, 05-10-2003 a las 14:44, Ben Maurer escribió:
> On Sun, 2003-10-05 at 14:52, Pablo Fischer wrote:
> > Hello Miguel!
> > 
> > Well Im creating something like that, cause I'm loading the xmlfile
> > (LoadConfigFile) in a struct like this:
> > 
> >   private struct ConfigInfo {
> > string username;
> > string password;
> > string url;
> > string identifier;
> >   }
> > 
> > So if the file exists I 'load' the file in a struct
> > 
> > ConfigInfo[] configtmp = new ConfigInfo[node_username.Count];
> > 
> > And then start 'saving' the xml data in the struct. 
> > 
> > Once I have the configtmp loaded I just use it every time I need some
> > information. But what happens if the user wants to remove an account
> You can use an array list so you can add/remove accounts (see the msdn
> docs)
> >  or
> > modify something (like the password)
> you can modify the information
> > , how can I save that to my xml
> > file?
> Reserialize it. Read the msdn docs.
> 
> As well, both monologue and monodoc have some examples of Xml
> Serialization, you may want to check them out.
> 
> ___
> Mono-list maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
-- 
Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx)
http://www.pablo.com.mx
http://www.debianmexico.org
GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C
Firma URL: http://www.pablo.com.mx/firmagpg.txt

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Question about run Nunit test suites with nunit-console.exe

2003-10-05 Thread [EMAIL PROTECTED]
Hello:

A little question about nunit-console.exe in linux.
i have a nunit test suite that have some configuration params stored in
a config file (PostgreSql.Data.PgSqlClient.UnitTests.dll.config) the
parameters are accessed using ConfigurationSettings.AppSettings["xxx"]
this works nice in windows but in linux seems that the config file is
not loaded
is this correct ??



--
Best regards

Carlos Guzmán Álvarez
Vigo-Spain

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] ByteFX updated in cvs

2003-10-05 Thread Reggie Burnett
Everyone

I have synced up my Mysql ADO.Net provider code with Mono.  It is the latest
code and did undergo some significant changes lately to support LOCAL DATA
INFILE and correct some pooling problems.  I haven’t released this code yet
as a build so buggers could lurk.

Reggie


___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Question about run Nunit test suites with nunit-console.exe

2003-10-05 Thread Gonzalo Paniagua Javier
El dom, 05-10-2003 a las 23:52, [EMAIL PROTECTED] escribió:
> Hello:
> 
> A little question about nunit-console.exe in linux.
> i have a nunit test suite that have some configuration params stored in
> a config file (PostgreSql.Data.PgSqlClient.UnitTests.dll.config) the
> parameters are accessed using ConfigurationSettings.AppSettings["xxx"]
> this works nice in windows but in linux seems that the config file is
> not loaded
> is this correct ??

We probably have a bug. Can you file a bug providing a test case and
instructions on how to reproduce?


Thanks.

-Gonzalo


___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Modify XML Docs

2003-10-05 Thread Miguel de Icaza
Hello,

> Well Im creating something like that, cause I'm loading the xmlfile
> (LoadConfigFile) in a struct like this:
> 
>   private struct ConfigInfo {
>   string username;
>   string password;
>   string url;
>   string identifier;
>   }
> 
> So if the file exists I 'load' the file in a struct
> 
> ConfigInfo[] configtmp = new ConfigInfo[node_username.Count];
> 
> And then start 'saving' the xml data in the struct. 
> 
> Once I have the configtmp loaded I just use it every time I need some
> information. But what happens if the user wants to remove an account or
> modify something (like the password), how can I save that to my xml
> file?

That is the beauty of the XmlSerializer: You provide it with your
structured data, and it will take care of the file format used.

If you add/remove accounts in your program, you will be making changes
to the actual data structures.  Then the serializer will write out and
read-in the structures for you.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Modify XML Docs

2003-10-05 Thread Pablo Fischer
Hi!

Yeah, I didnt know that, now I'm using two classes, arraylist (in one
class) and the XmlSerializer and I can add, remove and modify accounts.
And everytime the user want's to exit from mBloggy the XmlSerializer
will update the XmlFile.

Thanks!
El dom, 05-10-2003 a las 19:30, Miguel de Icaza escribió:
> That is the beauty of the XmlSerializer: You provide it with your
> structured data, and it will take care of the file format used.
> 
> If you add/remove accounts in your program, you will be making changes
> to the actual data structures.  Then the serializer will write out and
> read-in the structures for you.
> ___
> Mono-list maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
-- 
Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx)
http://www.pablo.com.mx
http://www.debianmexico.org
GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C
Firma URL: http://www.pablo.com.mx/firmagpg.txt

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] Mono 0.28 - Still fails under windows 2000 P

2003-10-05 Thread Paul Paximadis
I tried setting my TimeZone setting to something else and the program compiled fine 
and run fine.
I changed it from "(GMT+02:00) Harare, Pretoria" to "(GMT+02:00) Cairo" and everything 
works fine.
This worked with "Automatically adjust clock for daylight savings changes" checked or 
not.

I then changed to "(GMT-07:00) Arizona" and the error came back.

It seems that the Time Zones that do not have setting for "Automatically adjust clock 
for daylight savings changes" create the error.

I cant test this patch as I am at work and do not have cygwin etc.. Setup here.
I can test an executable for you if you want, but you might be able to recreate the 
problem if you change your TimeZone settings.

Thanks for all your help
Paul


-Original Message-
From: Varga Zoltan [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 05, 2003 16:59
To: Atsushi Eno
Cc: Paul Paximadis; Mono-List
Subject: Re: [Mono-list] Mono 0.28 - Still fails under windows 2000 P



 Hi,

  I checked in a fix for these problems. I hope it is is correct. I tested it by 
setting the timezone to GMT (i.e. no dayling saving). 

The patch is the following:

<<<
Index: icall.c ===
RCS file: /cvs/public/mono/mono/metadata/icall.c,v
retrieving revision 1.339
diff -u -3 -p -r1.339 icall.c
--- icall.c 26 Sep 2003 16:25:40 -  1.339
+++ icall.c 5 Oct 2003 15:08:17 -
@@ -3121,9 +3121,11 @@ ves_icall_System_CurrentTimeZone_GetTime
TIME_ZONE_INFORMATION tz_info;
FILETIME ft;
int i;
-   int err;
+   int err, tz_id;

-   GetTimeZoneInformation (&tz_info);
+   tz_id = GetTimeZoneInformation (&tz_info);
+   if (tz_id == TIME_ZONE_ID_INVALID)
+   return 0;
 
MONO_CHECK_ARG_NULL (data);
MONO_CHECK_ARG_NULL (names);
@@ -3139,6 +3141,19 @@ ves_icall_System_CurrentTimeZone_GetTime
if (!tz_info.StandardName [i])
break;
mono_array_set ((*names), gpointer, 0,
mono_string_new_utf16 (domain, tz_info.StandardName, i));
+
+   if ((year <= 1601) || (year > 30827)) {
+   /*
+* According to MSDN, the MS time functions can't handle
dates outside
+* this interval.
+*/
+   return 1;
+   }
+
+   if (tz_id == TIME_ZONE_ID_UNKNOWN) {
+   /* No daylight saving in this time zone */
+   return 1;
+   }
 
tz_info.StandardDate.wYear = year;
err = SystemTimeToFileTime (&tz_info.StandardDate, &ft); 
<<

Could somebody who is actually seeing this problem test it
and see
if it fixes the problem? If it is, then we can make a new windows release with only 
this patch.

  bye

  Zoltan



Atsushi Eno <[EMAIL PROTECTED]> írta:

> Hello,
> 
> After applying attached patch, this problem looks gone away. But I 
> don't know it might break this method.
> 
> Atsushi Eno
> 
> 




___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list