Hi,
I have created a page that downloads a vCalendar to a visitor. If the person
logs on from somewhere other than EST their times are incorrect.
for example, someone in Colorado accesses the page that is hosted in NYC.
The time in the vCalendar should be for 4pm to 6pm but the person from
Colorado is getting 2 hours behind 2pm to 4pm. Is there a way to NOT have
the time shift. Yes, I realize Colorado is 2 hours behind NYC, but shouldnt
the time be dependant upon whose computer the vCalendar is saved on?
here is my code:
Sub Page_Load(Sende r As Object, E As EventArgs)
'PARAMETERS
Dim beginDate as Date = #01/07/2005 4:00 PM#
Dim endDate as Date = #01/07/2005 6:00 PM#
Dim myLocation as String = "Computer Room"
Dim mySubject as String = "Training"
Dim myDescription as String = "Event details"
'INITIALIZATION
Dim mStream As new MemoryStream()
Dim writer As new StreamWriter(mS tream)
writer.AutoFlus h = true
'HEADER
writer.WriteLin e("BEGIN:VCALEN DAR")
writer.WriteLin e("PRODID:-//Flo Inc.//FloSoft//EN")
writer.WriteLin e("BEGIN:VEVENT ")
'BODY
writer.WriteLin e("DTSTART:" & _
beginDate.ToUni versalTime.ToSt ring("yyyyMMdd\ THHmmss\Z") )
writer.WriteLin e("DTEND:" & _
endDate.ToUnive rsalTime.ToStri ng("yyyyMMdd\TH Hmmss\Z") )
writer.WriteLin e("LOCATION:" & myLocation)
writer.WriteLin e("DESCRIPTION; ENCODING=QUOTED-PRINTABLE:" &
myDescription)
writer.WriteLin e("SUMMARY:" & mySubject)
'FOOTER
writer.WriteLin e("PRIORITY:3 ")
writer.WriteLin e("END:VEVENT ")
writer.WriteLin e("END:VCALENDA R")
'MAKE IT DOWNLOADABLE
Response.Clear( ) 'clears the current output content from the buffer
Response.Append Header("Content-Disposition", _
"attachment ; filename=Add2Ca lendar.vcs")
Response.Append Header("Content-Length", mStream.Length. ToString())
Response.Conten tType = "applicatio n/download"
Response.Binary Write(mStream.T oArray())
Response.End()
End Sub
I have created a page that downloads a vCalendar to a visitor. If the person
logs on from somewhere other than EST their times are incorrect.
for example, someone in Colorado accesses the page that is hosted in NYC.
The time in the vCalendar should be for 4pm to 6pm but the person from
Colorado is getting 2 hours behind 2pm to 4pm. Is there a way to NOT have
the time shift. Yes, I realize Colorado is 2 hours behind NYC, but shouldnt
the time be dependant upon whose computer the vCalendar is saved on?
here is my code:
Sub Page_Load(Sende r As Object, E As EventArgs)
'PARAMETERS
Dim beginDate as Date = #01/07/2005 4:00 PM#
Dim endDate as Date = #01/07/2005 6:00 PM#
Dim myLocation as String = "Computer Room"
Dim mySubject as String = "Training"
Dim myDescription as String = "Event details"
'INITIALIZATION
Dim mStream As new MemoryStream()
Dim writer As new StreamWriter(mS tream)
writer.AutoFlus h = true
'HEADER
writer.WriteLin e("BEGIN:VCALEN DAR")
writer.WriteLin e("PRODID:-//Flo Inc.//FloSoft//EN")
writer.WriteLin e("BEGIN:VEVENT ")
'BODY
writer.WriteLin e("DTSTART:" & _
beginDate.ToUni versalTime.ToSt ring("yyyyMMdd\ THHmmss\Z") )
writer.WriteLin e("DTEND:" & _
endDate.ToUnive rsalTime.ToStri ng("yyyyMMdd\TH Hmmss\Z") )
writer.WriteLin e("LOCATION:" & myLocation)
writer.WriteLin e("DESCRIPTION; ENCODING=QUOTED-PRINTABLE:" &
myDescription)
writer.WriteLin e("SUMMARY:" & mySubject)
'FOOTER
writer.WriteLin e("PRIORITY:3 ")
writer.WriteLin e("END:VEVENT ")
writer.WriteLin e("END:VCALENDA R")
'MAKE IT DOWNLOADABLE
Response.Clear( ) 'clears the current output content from the buffer
Response.Append Header("Content-Disposition", _
"attachment ; filename=Add2Ca lendar.vcs")
Response.Append Header("Content-Length", mStream.Length. ToString())
Response.Conten tType = "applicatio n/download"
Response.Binary Write(mStream.T oArray())
Response.End()
End Sub