Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

REQUEST_TIME in C#

Tags:

c#

asp.net

Is there a similar function in C# that is akin to the PHP functionality of ("$_SERVER['REQUEST_TIME']")?

like image 236
Pankaj Mishra Avatar asked Jan 19 '23 14:01

Pankaj Mishra


1 Answers

The following property returns the initial timestamp of the current HTTP request:

HttpRequest.RequestContext.HttpContext.Timestamp

In an ASP.Net-Page it can be accessed through the Request object like this:

Request.RequestContext.HttpContext.Timestamp

Hope I could help.

like image 189
Dennis Traub Avatar answered Jan 27 '23 23:01

Dennis Traub