|
John Simmons / outlaw programmer wrote: on all of the articles I've tried, the dates are correct.
Maybe, just maybe, that is because you publish before (your) midnight, whereas I may often publish between my midnight, and Chris's midnight; but then that should not matter, it still is different when looked at using a browser and using HttpWebRequest.
you should try scraping CP Vanity[^] and see what I mean.
|
|
|
|
|
perhaps in the header of the request you can also specify your timezone. that may fix your issue.
|
|
|
|
|
you may be right, I've never seen it though. do you also have any specific information available as to how to do that?
|
|
|
|
|
|
|
Thanks for the info, the Date property is pretty new, it exists since 4.0
unfortunately, it does not convey the timezone, and setting it to DateTime.Now did not help at all (the server could derive the client's timezone by comparing request datetime with server datetime, but doing so it would assume the request arrived "immediately", which does not have to be true).
From what I've read on the web there really isn't an official way to convey the client's timezone through HTTP. The only approach discussed is sending a page containing the necessary JavaScript to fix datetimes... And it is my guess that is what CP does, although I haven't found it yet amidst loads of code.
Thanks anyway.
|
|
|
|
|
Yes, true the Date property is new since .NET 4.0.
However, you can set the Date header in the Headers collection.
It looks like it is specified in GMT. So you maybe you should use DateTime.UtcNow , instead of DateTime.Now .
Anyway, happy coding!
|
|
|
|
|
you are persistent, I must admit.
I now tried with request.Date=DateTime.UtcNow , no change.
|
|
|
|
|
|
Luc suggested the use of a user agent, and that fixed my problem... Weird that I'm just now discovering it, though...
Apologies to Chris, et al, for suggesting that they're doing something wonky on the page.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: Apologies
John, you're getting a real softie here. They do modify HTML and withhold information in mysterious ways. We are in the dark as to what information would be required in the UserAgent in order to obtain all available information correctly or even at all.
|
|
|
|
|
|
Luc will laugh, but hit Ctrl+F5 to force a CSS update.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
you're absolutely right.
|
|
|
|
|
Good now.
|
|
|
|
|
|
Yep. I saw it too. We were waiting for this one since a long time.
No more 'fake answers' now.
..Go Green..
|
|
|
|
|
Ya, I checked it too.
We are unable to edit or delete once we put comment.
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Sandeep Mewara wrote: I saw today that posting comments on questions and answers has been released for us
This new feature is very very cool.
CP team - nice work.
|
|
|
|
|
Allows you almost to chat with the OP, without creating noise in the answers (no-one was using the Question forum anyway...). Great feature
|
|
|
|
|
We're still fine tuning. We thought we'd get what we currently had out first, then add little extras like edit and delete
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Yep! Thought so...
Changes looks great...
|
|
|
|
|
The reason there is so much in the way of "enhancement" suggestions in the forums... This[^] lady has joined us looking for love; obviously people will need all the help they can get to "look after" her.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Looks like she already has been looked after by Chris... "This account has been disabled!"
|
|
|
|
|
The swine. He's keeping her to himself. It's not as though he hasn't got enough attractive young ladies around the CP office - it seems the talent pool in Canada is much higher, so they really do have gorgeous 26 year old PhD nuclear physicists just hanging around at CP central waiting to defuse the bomb.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|