Problem with DateTimePicker Value property

  • Thread starter Thread starter Joe Cool
  • Start date Start date
J

Joe Cool

If the user or the code does not change the Value property of a
DateTimePicker control, it dfefaults to DateTime.Now, which inclides
the current date and time. I want the value that will ultimately be
serialized to an XML file to be equivalent to DateTime.Today, which is
a date with not time, or more speciically, a time of 12 AM.

So I initialize the Value property to DateTime.Today.

If the user does not select a different date, when the value is
serialized, the time portion becomes:

T00:00:00-04:00

But if the user selects a different date, when serialized, the time
portion becomes:

T00:00:00

The first format with the "-04:00" causes problems in my app later on.
I am wondering A) how come it is even there, and more importantly. B)
how the heck do i get rid of it?!?!?
 
Whats your time zone?

Eastern US. So this is the time zone offset from UT, eh? I wonder why
it is there to begine with, but dissappears if the user selects a
different date?
 
Back
Top