Implementation of the 2.0 session state model
[mono.git] / mcs / class / System.Web / System.Web.SessionState / StateServerItem.cs
index ec006dc0f93e08116a3bcf46da8c014110ca356d..ad43c2bf1d75765a6ec900e52fc2e924627258b3 100644 (file)
@@ -27,7 +27,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-
+#if !NET_2_0
 using System;
 
 namespace System.Web.SessionState {
@@ -45,7 +45,7 @@ namespace System.Web.SessionState {
                        this.dict_data = dict_data;
                        this.sobjs_data = sobjs_data;
                        this.timeout = timeout;
-                       this.last_access = DateTime.Now;
+                       this.last_access = DateTime.UtcNow;
                }
 
                public byte [] DictionaryData {
@@ -60,11 +60,11 @@ namespace System.Web.SessionState {
                
                public void Touch ()
                {
-                       last_access = DateTime.Now;
+                       last_access = DateTime.UtcNow;
                }
 
                public bool IsAbandoned () {
-                       if (last_access.AddMinutes (timeout) < DateTime.Now)
+                       if (last_access.AddMinutes (timeout) < DateTime.UtcNow)
                                return true;
                        return false;
                }
@@ -74,4 +74,4 @@ namespace System.Web.SessionState {
                }
        }
 }
-
+#endif