Re: client/server datetime
I tried to convert from UTC to eastern time zone but I still end up with UTC time, not sure why.
Code:
Dim easternZone As TimeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time")
Dim easternTime As DateTime = TimeZoneInfo.ConvertTimeFromUtc(Now.ToUniversalTime, easternZone)
Dim sigintime As DateTime = easternTime
Re: client/server datetime
If you need to have a database that will display local datetime to clients then you need to ALWAYS save the date in UTC format. Each client will have a timeoffset that you will have to calculate before sending. UTC time is always stored in GMT+0, so let's say your client has a timezone of -7, then all you have to do is to use a function DateAdd with HOURS and pass in the timeoffset. Also, if your database already contains data stored as SERVER DATE, then you can use what met0555 proposed to convert the server date to UTC date and then still use DateAdd to convert the date/time to clients datetime.