[Mono-list] Problems with DateTime (maybe a bug)

Kornél Pál kornelpal at gmail.com
Tue Aug 8 09:48:59 EDT 2006


"1984-08-08T10:35:15.9147790-02:00" contains time zone as well so 
"07/08/1984" can be the same date in a different time zone. You should have 
a deeper look at the issue because there is a database involved as well so 
it's quite difficult to tract the problem without access to the database. 
You should first reproduce the date<->string conversion without the database 
first so you can get to know where the problem is.


----- Original Message ----- 
From: "Arx Henrique" <arxcruz at gmail.com>
To: <mono-list at lists.ximian.com>
Sent: Tuesday, August 08, 2006 3:36 PM
Subject: [Mono-list] Problems with DateTime (maybe a bug)

> Hello all,
> I have a webservice running in my machine who accessa a database and
> return one date.
> When i get data from test form, i get this value (from database):
> 1984-08-08T10:35:15.9147790-02:00 as DateTime
> then i assign to a variable with:
> DateTime birth = (DateTime) row["table_in_database"]
> all works perfectly, but if i try:
> birth.ToString("dd/MM/yyyy") or any To*DateString()
> always return on day less like: 07/08/1984
> is this a bug or am i make something wrong?
> -- 
> "A fé remove montanhas, mas eu prefiro a dinamite"
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list

More information about the Mono-list mailing list