|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
TimeZone problemsI have a datetime value that is already in GMT (UTC) time. What I would like to do is convert this value into Pacific Standard Time, but I also need to account for daylight savings time. Simply subtracting eight hours from the value will give me the proper time (subtracting seven hours if daylight savings time). I tried using the TimeZone object to see if the value is in daylight savings time like this If TimeZone.IsDaylightSavingTime (value) = True Then value.AddHours(-7) Else value.AddHours(-8) End If However, I always get a NullReferenceException (i.e. object reference not set to an instance of an object) for the TimeZone object. How do I properly use the TimeZone object? Since it is labeled as MustInherit, do I need to create an object that inherits the TimeZone object just to use this method? Thanks, Roshawn Hi Roshawn,
I have the perfext fix for you. www.TimeZoneSource.com ..NET component, both windows and web, very lightweight. HTH Dan Roshawn Dawson wrote: Show quoteHide quote > Hi, > > I have a datetime value that is already in GMT (UTC) time. What I would like to do is convert this > value into Pacific Standard Time, but I also need to account for daylight savings time. > > Simply subtracting eight hours from the value will give me the proper time (subtracting seven hours > if daylight savings time). I tried using the TimeZone object to see if the value is in daylight > savings time like this > > If TimeZone.IsDaylightSavingTime (value) = True Then > value.AddHours(-7) > Else > value.AddHours(-8) > End If > > However, I always get a NullReferenceException (i.e. object reference not set to an instance of an > object) for the TimeZone object. > > How do I properly use the TimeZone object? Since it is labeled as MustInherit, do I need to create > an object that inherits the TimeZone object just to use this method? > > Thanks, > Roshawn Hey, thanks for the resource! :-)
dkist***@dankisting.com wrote: Show quoteHide quote > Hi Roshawn, > > I have the perfext fix for you. > > www.TimeZoneSource.com > > .NET component, both windows and web, very lightweight. > > HTH > > Dan
Modifying a text file
disable Close button (X) Application doesn't close on Shut Down - Please help! read the contents of Address bar in browser accessing CD/DVD-ROM without drive letters .NET2.0: Performance von String-Operationen Error- Type expected stringbuilder help Refernece an assembly using a string Change icon shown on the desktop |
|||||||||||||||||||||||