Revision 5e31048f trunk/Pithos.Interfaces/PithosDateTimeConverter.cs

b/trunk/Pithos.Interfaces/PithosDateTimeConverter.cs
25 25

  
26 26
            if (value is DateTime)
27 27
            {
28
                DateTime dateTime = (DateTime)value;
29
                DateTime utcDateTime = dateTime.ToUniversalTime();
28
                var dateTime = (DateTime)value;
29
                var utcDateTime = dateTime.ToUniversalTime();
30 30
                seconds = (utcDateTime - _epoch).TotalSeconds; ;
31 31
            }
32
#if !PocketPC && !NET20
33 32
            else if (value is DateTimeOffset)
34 33
            {
35
                DateTimeOffset dateTimeOffset = (DateTimeOffset)value;
36
                DateTimeOffset utcDateTimeOffset = dateTimeOffset.ToUniversalTime();
34
                var dateTimeOffset = (DateTimeOffset)value;
35
                var utcDateTimeOffset = dateTimeOffset.ToUniversalTime();
37 36
                seconds= (utcDateTimeOffset.UtcDateTime - _epoch).TotalSeconds;
38 37
            }
39
#endif
40 38
            else
41 39
            {
42 40
                throw new Exception("Expected date object value.");
......
72 70
            DateTime d =  _epoch.AddSeconds(seconds);
73 71

  
74 72

  
75
#if !PocketPC && !NET20
76 73
            if (t == typeof(DateTimeOffset))
77 74
                return new DateTimeOffset(d);
78
#endif
79

  
80 75
            return d;
81 76
        }
82 77

  

Also available in: Unified diff