I use following code to download a web page source code in my project:

vb Code:
  1. Private Function dlwebFile(ByVal sUrl As String, ByVal sFile As String) As Boolean
  2.     Try
  3.         Dim wr As HttpWebRequest = WebRequest.Create(sUrl)
  4.         wr.Method = "POST"
  5.         'wr.ContentLength = strPostData.Length
  6.         wr.ContentType = "application/x-www-form-urlencoded"
  7.         wr.UserAgent = "Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)"
  8.         wr.CookieContainer = New CookieContainer
  9.  
  10.         Dim sw As StreamWriter = New StreamWriter(wr.GetRequestStream)
  11.         'sw.Write(strPostData)
  12.         sw.Close()
  13.  
  14.         Dim ws As HttpWebResponse = CType(wr.GetResponse(), HttpWebResponse)
  15.         Using str As Stream = ws.GetResponseStream()
  16.             Dim inBuf(100000000) As Byte 'allows to download upto 100 mb file
  17.             Dim bytesToRead As Integer = CInt(inBuf.Length)
  18.             Dim bytesRead As Integer = 0
  19.             While bytesToRead > 0
  20.                 Dim n As Integer = str.Read(inBuf, bytesRead, bytesToRead)
  21.                 If n = 0 Then
  22.                     Exit While
  23.                 End If
  24.                 bytesRead += n
  25.                 bytesToRead -= n
  26.             End While
  27.             Using fstr As FileStream = New FileStream(sFile, FileMode.Create)
  28.                 fstr.Write(inBuf, 0, bytesRead)
  29.             End Using
  30.         End Using
  31.         Return True
  32.     Catch ex As Exception
  33.         Return False
  34.     End Try
  35. End Function

The web page I am trying to download is a intranet site. I am periodically downloading the web page for archiving purpose for future reference. The web page will list the current active jobs/projects we work. We process 100's of jobs everyday. The list item will have the Project id, Project name, Project deadline, etc.

The download works fine. the web page is downloaded locally. The problem is the date/time format is changed to some other format. If I view the web page in browser, the deadline of one of the project shows as "7/15 03:00".

However, the downloaded webpage shows the deadline of that project as "Wed Jul 14 16:30:00 CDT 2010". I believe it shows in CDT timezone. Also, it shows couple of other timezone too. I think the project might be created from those countries. I am in India timezone.

Can someone help me on solving this issue?

Thanks