3. September 2009 16:50
private int ServerSideJsUtcOffset
DateTime epoch = new DateTime(1970,1,1);
int offset = (int)epoch.ToUniversalTime().Subtract(epoch).TotalMilliseconds;
I should note that I could have set the initial date to DateTime.Now instead of implicitely using the JS epoch, as the difference would be the same for any localized DateTime, just felt the clarity was worth it.