Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Uri target = new Uri("http://www.steamcommunity.com/");
- cookieContainer.Add(new Cookie("timezoneOffset", "7200,0") { Domain = target.Host });
- function setTimezoneCookies()
- {
- var now = new Date();
- var expire = new Date();
- // One year expiration, this way we don't need to wait at least one page
- // load to have accurate timezone info each session, but only each time the user
- // comes with cleared cookies
- expire.setTime( now.getTime() + 3600000*24*365 );
- tzOffset = now.getTimezoneOffset() * -1 * 60;
- isDST = 0;
- document.cookie = "timezoneOffset=" + tzOffset + "," + isDST + ";expires="+expire.toGMTString() + ";path=/";
- }
- // We always want to have the timezone cookie set for PHP to use
- setTimezoneCookies();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement