120 references to Utc
mscorlib (37)
system\currenttimezone.cs (1)
235
if (time.Kind == DateTimeKind.
Utc
) {
system\datetime.cs (6)
724
DateTime utcDt = new DateTime(ticks, DateTimeKind.
Utc
);
774
return new DateTime(universalTicks, DateTimeKind.
Utc
);
798
if (Kind == DateTimeKind.
Utc
) {
1006
return DateTimeKind.
Utc
;
1072
Contract.Ensures(Contract.Result<DateTime>().Kind == DateTimeKind.
Utc
);
1222
case DateTimeKind.
Utc
: return ValidateSystemTime(ref time, localTime: false);
system\datetimeoffset.cs (7)
71
if (dateTime.Kind != DateTimeKind.
Utc
) {
91
else if (dateTime.Kind == DateTimeKind.
Utc
) {
114
!DateTime.IsValidTimeWithLeapSeconds(m_dateTime.Year, m_dateTime.Month, m_dateTime.Day, m_dateTime.Hour, m_dateTime.Minute, 60, DateTimeKind.
Utc
))
135
!DateTime.IsValidTimeWithLeapSeconds(m_dateTime.Year, m_dateTime.Month, m_dateTime.Day, m_dateTime.Hour, m_dateTime.Minute, 60, DateTimeKind.
Utc
))
157
!DateTime.IsValidTimeWithLeapSeconds(m_dateTime.Year, m_dateTime.Month, m_dateTime.Day, m_dateTime.Hour, m_dateTime.Minute, 60, DateTimeKind.
Utc
))
190
Contract.Ensures(Contract.Result<DateTime>().Kind == DateTimeKind.
Utc
);
191
return DateTime.SpecifyKind(m_dateTime, DateTimeKind.
Utc
);
system\globalization\datetimeformat.cs (2)
727
} else if (dateTime.Kind == DateTimeKind.
Utc
) {
782
case DateTimeKind.
Utc
:
system\globalization\datetimeparse.cs (5)
2600
result.parsedDate = DateTime.SpecifyKind(result.parsedDate, DateTimeKind.
Utc
);
2616
result.parsedDate = DateTime.SpecifyKind(result.parsedDate, DateTimeKind.
Utc
);
2673
result.parsedDate = new DateTime(utcTicks, DateTimeKind.
Utc
);
2698
result.parsedDate = new DateTime(resultTicks, DateTimeKind.
Utc
);
2736
DateTime utcDt = new DateTime(resultTicks, DateTimeKind.
Utc
);
system\timezone.cs (5)
96
if (time.Kind == DateTimeKind.
Utc
) {
101
return new DateTime(DateTime.MaxTicks, DateTimeKind.
Utc
);
104
return new DateTime(DateTime.MinTicks, DateTimeKind.
Utc
);
106
return new DateTime(tickCount, DateTimeKind.
Utc
);
201
if (kind == DateTimeKind.
Utc
) {
system\timezoneinfo.cs (11)
212
kind = DateTimeKind.
Utc
;
387
else if (dateTime.Kind == DateTimeKind.
Utc
) {
472
else if (dateTime.Kind == DateTimeKind.
Utc
) {
473
if (cachedData.GetCorrespondingKind(this) == DateTimeKind.
Utc
) {
518
else if (dateTime.Kind == DateTimeKind.
Utc
) {
582
else if (dateTime.Kind == DateTimeKind.
Utc
) {
583
if (cachedData.GetCorrespondingKind(this) == DateTimeKind.
Utc
) {
681
else if (dateTime.Kind == DateTimeKind.
Utc
&& String.Compare(sourceTimeZoneId, TimeZoneInfo.Utc.Id, StringComparison.OrdinalIgnoreCase) == 0) {
738
if (dateTime.Kind == DateTimeKind.
Utc
) {
843
if (dateTime.Kind == DateTimeKind.
Utc
) {
852
if (dateTime.Kind == DateTimeKind.
Utc
) {
System (1)
net\System\Net\mail\SmtpDateTime.cs (1)
139
case DateTimeKind.
Utc
:
System.Data (5)
fx\src\data\System\Data\Common\DateTimeStorage.cs (3)
145
if (tmpValue.Kind == DateTimeKind.
Utc
) {
152
retVal = DateTime.SpecifyKind(tmpValue, DateTimeKind.
Utc
);
159
else if (tmpValue.Kind == DateTimeKind.
Utc
) {
fx\src\data\System\Data\Common\ObjectStorage.cs (1)
444
values[i] = (DateTime.SpecifyKind(dt, DateTimeKind.
Utc
)).ToLocalTime();
fx\src\data\System\Data\Filter\FunctionNode.cs (1)
458
case DateTimeKind.
Utc
:
System.Data.Services (5)
System\Data\Services\Serializers\JsonReader.cs (1)
93
DateTime dateTime = new DateTime(ticks * 10000 + JsonWriter.DatetimeMinTimeTicks, DateTimeKind.
Utc
);
System\Data\Services\Serializers\JsonWriter.cs (4)
28
internal static readonly long DatetimeMinTimeTicks = (new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.
Utc
)).Ticks;
272
dateTime = new DateTime(dateTime.Ticks, DateTimeKind.
Utc
);
274
case DateTimeKind.
Utc
:
278
System.Diagnostics.Debug.Assert(dateTime.Kind == DateTimeKind.
Utc
, "dateTime.Kind == DateTimeKind.Utc");
System.Data.Services.Client (1)
System\Data\Services\Client\ClientConvert.cs (1)
317
return XmlConvert.ToString(dt.Kind == DateTimeKind.Unspecified && atomDateConstruct ? new DateTime(dt.Ticks, DateTimeKind.
Utc
) : dt, XmlDateTimeSerializationMode.RoundtripKind);
System.IdentityModel (13)
System\IdentityModel\BoundedCache.cs (1)
376
if (expirationTime.Kind != DateTimeKind.
Utc
)
System\IdentityModel\DateTimeUtil.cs (2)
64
if (null == value || value.Value.Kind == DateTimeKind.
Utc
)
74
if (value.Kind == DateTimeKind.
Utc
)
System\IdentityModel\SecurityUtils.cs (2)
56
return new DateTime(DateTime.MaxValue.Ticks - TimeSpan.TicksPerDay, DateTimeKind.
Utc
);
65
return new DateTime(DateTime.MinValue.Ticks + TimeSpan.TicksPerDay, DateTimeKind.
Utc
);
System\IdentityModel\Tokens\SamlSecurityTokenHandler.cs (4)
48
static DateTime WCFMinValue = new DateTime(DateTime.MinValue.Ticks + TimeSpan.TicksPerDay, DateTimeKind.
Utc
);
49
static DateTime WCFMaxValue = new DateTime(DateTime.MaxValue.Ticks - TimeSpan.TicksPerDay, DateTimeKind.
Utc
);
1983
if (conditions.NotBefore != DateTimeUtil.GetMinValue(DateTimeKind.
Utc
) &&
1992
if (conditions.NotOnOrAfter != DateTimeUtil.GetMaxValue(DateTimeKind.
Utc
) &&
System\IdentityModel\Tokens\SessionSecurityToken.cs (4)
465
DateTime effectiveTime = new DateTime(XmlUtil.ReadElementContentAsInt64(reader), DateTimeKind.
Utc
);
471
DateTime expiryTime = new DateTime(XmlUtil.ReadElementContentAsInt64(reader), DateTimeKind.
Utc
);
477
DateTime keyEffectiveTime = new DateTime(XmlUtil.ReadElementContentAsInt64(reader), DateTimeKind.
Utc
);
483
DateTime keyExpiryTime = new DateTime(XmlUtil.ReadElementContentAsInt64(reader), DateTimeKind.
Utc
);
System.Runtime.Caching (1)
System\Caching\MemoryCacheEntryChangeMonitor.cs (1)
15
private static readonly DateTime DATETIME_MINVALUE_UTC = new DateTime(0, DateTimeKind.
Utc
);
System.Runtime.Serialization (9)
System\Runtime\Serialization\Json\JsonGlobals.cs (1)
36
public static readonly long unixEpochTicks = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.
Utc
).Ticks;
System\Runtime\Serialization\Json\JsonReaderDelegator.cs (3)
198
DateTimeKind dateTimeKind = DateTimeKind.
Utc
;
234
DateTime dateTime = new DateTime(ticks, DateTimeKind.
Utc
);
241
case DateTimeKind.
Utc
:
System\Runtime\Serialization\Json\JsonWriterDelegator.cs (2)
203
if (value.Kind != DateTimeKind.
Utc
)
251
case DateTimeKind.
Utc
:
System\Xml\XmlConverter.cs (3)
790
kind = DateTimeKind.
Utc
;
797
kind = DateTimeKind.
Utc
;
1114
case DateTimeKind.
Utc
:
System.ServiceModel (12)
System\ServiceModel\Dispatcher\XPathMessageContext.cs (2)
204
internal readonly static DateTime ZeroDate = new DateTime(1, 1, 1, 0, 0, 0, DateTimeKind.
Utc
);
416
if (date.Kind != DateTimeKind.
Utc
)
System\ServiceModel\Security\SecurityTimestamp.cs (2)
32
Fx.Assert(creationTimeUtc.Kind == DateTimeKind.
Utc
, "creation time must be in UTC");
33
Fx.Assert(expiryTimeUtc.Kind == DateTimeKind.
Utc
, "expiry time must be in UTC");
System\ServiceModel\Security\SecurityUtils.cs (2)
374
return new DateTime(DateTime.MaxValue.Ticks - TimeSpan.TicksPerDay, DateTimeKind.
Utc
);
383
return new DateTime(DateTime.MinValue.Ticks + TimeSpan.TicksPerDay, DateTimeKind.
Utc
);
System\ServiceModel\Security\TimeBoundedCache.cs (2)
348
Fx.Assert(item.ExpirationTime == DateTime.MaxValue || item.ExpirationTime.Kind == DateTimeKind.
Utc
, "");
504
Fx.Assert( expirationTime == DateTime.MaxValue || expirationTime.Kind == DateTimeKind.
Utc
, "");
System\ServiceModel\Security\Tokens\SecurityContextCookieSerializer.cs (4)
70
effectiveTime = new DateTime(XmlHelper.ReadElementContentAsInt64(reader), DateTimeKind.
Utc
);
74
expiryTime = new DateTime(XmlHelper.ReadElementContentAsInt64(reader), DateTimeKind.
Utc
);
86
keyEffectiveTime = new DateTime(XmlHelper.ReadElementContentAsInt64(reader), DateTimeKind.
Utc
);
90
keyExpirationTime = new DateTime(XmlHelper.ReadElementContentAsInt64(reader), DateTimeKind.
Utc
);
System.ServiceModel.Web (3)
System\ServiceModel\Description\WebScriptClientGenerator.cs (1)
38
this.serviceLastModified = new DateTime(this.serviceLastModified.Year, this.serviceLastModified.Month, this.serviceLastModified.Day, this.serviceLastModified.Hour, this.serviceLastModified.Minute, this.serviceLastModified.Second, DateTimeKind.
Utc
);
System\ServiceModel\Dispatcher\HelpExampleGenerator.cs (1)
529
case DateTimeKind.
Utc
:
System\ServiceModel\Web\OutgoingWebResponseContext.cs (1)
73
(value.Kind == DateTimeKind.
Utc
?
System.Web (16)
Profile\SqlProfileProvider.cs (2)
527
dtLastActivity = DateTime.SpecifyKind(reader.GetDateTime(2), DateTimeKind.
Utc
);
528
dtLastUpdated = DateTime.SpecifyKind(reader.GetDateTime(3), DateTimeKind.
Utc
);
Security\ADMembershipProvider.cs (1)
116
private readonly DateTime DefaultLastLockoutDate = new DateTime(1754, 1, 1, 0, 0, 0, DateTimeKind.
Utc
);
Security\FormsAuthenticationTicketSerializer.cs (2)
69
DateTime ticketIssueDateUtc = new DateTime(ticketIssueDateUtcTicks, DateTimeKind.
Utc
);
82
DateTime ticketExpirationDateUtc = new DateTime(ticketExpirationDateUtcTicks, DateTimeKind.
Utc
);
Security\SQLMembershipProvider.cs (1)
1895
return new DateTime(utcDateTime.Year, utcDateTime.Month, utcDateTime.Day, utcDateTime.Hour, utcDateTime.Minute, utcDateTime.Second, DateTimeKind.
Utc
);
StaticFileHandler.cs (2)
519
DateTimeKind.
Utc
);
528
lastModifiedInUtc = new DateTime(utcNow.Ticks - (utcNow.Ticks % TimeSpan.TicksPerSecond), DateTimeKind.
Utc
);
UI\WebParts\SqlPersonalizationProvider.cs (3)
121
DateTime.SpecifyKind(reader.GetDateTime(1), DateTimeKind.
Utc
);
245
DateTime lastUpdatedDate = DateTime.SpecifyKind(reader.GetDateTime(1), DateTimeKind.
Utc
);
248
DateTime lastActivityDate = DateTime.SpecifyKind(reader.GetDateTime(4), DateTimeKind.
Utc
);
Util\DateTimeUtil.cs (1)
31
return new DateTime(universalTicks, DateTimeKind.
Utc
);
Util\FileUtil.cs (3)
596
UtcCreationTime = new DateTime(0, DateTimeKind.
Utc
);
597
UtcLastAccessTime = new DateTime(0, DateTimeKind.
Utc
);
598
UtcLastWriteTime = new DateTime(0, DateTimeKind.
Utc
);
Util\ParseHttpDate.cs (1)
219
return new DateTime(year, month, day, hour, minute, second, DateTimeKind.
Utc
);
System.Web.Extensions (2)
Script\Serialization\JavaScriptObjectDeserializer.cs (1)
380
DateTime dt = new DateTime(ticks * 10000 + JavaScriptSerializer.DatetimeMinTimeTicks, DateTimeKind.
Utc
);
Script\Serialization\JavaScriptSerializer.cs (1)
211
internal static readonly long DatetimeMinTimeTicks = (new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.
Utc
)).Ticks;
System.Xml (15)
System\Xml\BinaryXml\SqlUtils.cs (3)
756
return new DateTime(yr, mnth, day, hr, min, sec, ms, DateTimeKind.
Utc
);
770
DateTime d = new DateTime(yr, mnth, day, 0, 0, 0, DateTimeKind.
Utc
);
787
return new DateTime(1, 1, 1, hr, min, sec, ms, DateTimeKind.
Utc
);
System\Xml\Schema\XsdDateTime.cs (8)
172
case DateTimeKind.
Utc
: kind = XsdDateTimeKind.Zulu; break;
252
return DateTimeKind.
Utc
;
345
return new DateTime(dt.Ticks, DateTimeKind.
Utc
);
348
return new DateTime(dt.Subtract(new TimeSpan(ZoneHour, ZoneMinute, 0)).Ticks, DateTimeKind.
Utc
);
351
return new DateTime(dt.Add(new TimeSpan(ZoneHour, ZoneMinute, 0)).Ticks, DateTimeKind.
Utc
);
399
result = new DateTime(result.Ticks, DateTimeKind.
Utc
);
412
result = new DateTime(ticks, DateTimeKind.
Utc
).ToLocalTime();
425
result = new DateTime(ticks, DateTimeKind.
Utc
).ToLocalTime();
System\Xml\Serialization\Xmlcustomformatter.cs (1)
78
if (!LocalAppContextSwitches.IgnoreKindInUtcTimeSerialization && value.Kind == DateTimeKind.
Utc
)
System\Xml\XmlConvert.cs (3)
1349
case DateTimeKind.
Utc
:
1357
case DateTimeKind.
Utc
:
1361
return new DateTime(value.Ticks, DateTimeKind.
Utc
);