Bug in VS2008 for DateTime.ToString formating?

  • Thread starter Thread starter Chizl
  • Start date Start date
C

Chizl

I think I found a bug DateTime.ToString when formatting under GMT. This
took me about 15 to figure this has to be a bug in the formatting within
ToString.

I was adding support to allow browsers to ask for If-Modified-Date on a
file, when I started to compare the dates I found I wasn't flagging like
expected. I took a snapshot of my Watch window to show what I mean.

Look at the last 4, they should be the same date/time, just different
format. Not the case. Looks as if it auto-CST my date, since they are
already in GMT format..
http://www.chizl.com/aspuploaded/DateToStringIssue.jpg

At first I suspected I'm not sending milliseconds to the browser for
Last-Modified date on a file, so that is why the dates never match, because
the ticks will never match. I then decided to format to string and compare
the two strings for Month, Day, Year, Hour, Min, Sec, but when that came
back with two different values I beat on the wall for a while, before I
changed the format to a different format that gave me different than the
previous. So someone tell me is this a bug or am I'm the bug here?
 
Nevermind.. I'm the bug.. I looked at this for half an hour before posting
and now I see I'm using a different var.. The original.. Names are too
close, I'll need to change them.
 
Back
Top