59 instantiations of DateTimeOffset
mscorlib (39)
system\datetimeoffset.cs (31)
50public static readonly DateTimeOffset MinValue = new DateTimeOffset(DateTime.MinTicks, TimeSpan.Zero); 51public static readonly DateTimeOffset MaxValue = new DateTimeOffset(DateTime.MaxTicks, TimeSpan.Zero); 171return new DateTimeOffset(DateTime.Now); 177return new DateTimeOffset(DateTime.UtcNow); 206return new DateTimeOffset((m_dateTime + offset).Ticks, offset); 366return new DateTimeOffset(ClockDateTime.Add(timeSpan), Offset); 376return new DateTimeOffset(ClockDateTime.AddDays(days), Offset); 386return new DateTimeOffset(ClockDateTime.AddHours(hours), Offset); 396return new DateTimeOffset(ClockDateTime.AddMilliseconds(milliseconds), Offset); 406return new DateTimeOffset(ClockDateTime.AddMinutes(minutes), Offset); 410return new DateTimeOffset(ClockDateTime.AddMonths(months), Offset); 420return new DateTimeOffset(ClockDateTime.AddSeconds(seconds), Offset); 428return new DateTimeOffset(ClockDateTime.AddTicks(ticks), Offset); 440return new DateTimeOffset(ClockDateTime.AddYears(years), Offset); 516return new DateTimeOffset(DateTime.FromFileTime(fileTime)); 529return new DateTimeOffset(ticks, TimeSpan.Zero); 542return new DateTimeOffset(ticks, TimeSpan.Zero); 598return new DateTimeOffset(dateResult.Ticks, offset); 616return new DateTimeOffset(dateResult.Ticks, offset); 639return new DateTimeOffset(dateResult.Ticks, offset); 650return new DateTimeOffset(dateResult.Ticks, offset); 658return new DateTimeOffset(ClockDateTime.Subtract(value), Offset); 700return new DateTimeOffset(UtcDateTime.ToLocalTime(throwOnOverflow)); 724return new DateTimeOffset(UtcDateTime); 735result = new DateTimeOffset(dateResult.Ticks, offset); 748result = new DateTimeOffset(dateResult.Ticks, offset); 763result = new DateTimeOffset(dateResult.Ticks, offset); 778result = new DateTimeOffset(dateResult.Ticks, offset); 834return new DateTimeOffset(dateTime); 838return new DateTimeOffset(dateTimeOffset.ClockDateTime + timeSpan, dateTimeOffset.Offset); 843return new DateTimeOffset(dateTimeOffset.ClockDateTime - timeSpan, dateTimeOffset.Offset);
system\io\isolatedstorage\isolatedstoragefile.cs (3)
719return new DateTimeOffset(1601, 1, 1, 0, 0, 0, TimeSpan.Zero).ToLocalTime(); 760return new DateTimeOffset(1601, 1, 1, 0, 0, 0, TimeSpan.Zero).ToLocalTime(); 801return new DateTimeOffset(1601, 1, 1, 0, 0, 0, TimeSpan.Zero).ToLocalTime();
system\io\longpath.cs (3)
339return new DateTimeOffset(dtLocal).ToLocalTime(); 359return new DateTimeOffset(dtLocal).ToLocalTime(); 379return new DateTimeOffset(dtLocal).ToLocalTime();
system\stubhelpers.cs (1)
530DateTimeOffset managedUtcDTO = new DateTimeOffset(managedUtcTicks, TimeSpan.Zero);
system\timezoneinfo.cs (1)
723return new DateTimeOffset(ticks, destinationOffset);
System (1)
net\System\Net\mail\SmtpDateTime.cs (1)
173DateTimeOffset offset = new DateTimeOffset(this.date, this.timeZone);
System.Data (4)
fx\src\data\System\Data\Filter\FunctionNode.cs (1)
480return new DateTimeOffset((DateTime)argumentValues[0], new TimeSpan((int)argumentValues[1], (int)argumentValues[2], 0));
fx\src\data\System\Data\Sql\SqlMetaData.cs (1)
1038return new DateTimeOffset(InternalAdjustTimeTicks(value.Ticks), value.Offset);
fx\src\data\System\Data\SqlClient\SqlBuffer.cs (1)
416return new DateTimeOffset(GetTicksFromDateTime2Info(_value._dateTimeOffsetInfo.dateTime2Info) + offset.Ticks, offset);
fx\src\data\System\Data\SqlClient\SqlParameter.cs (1)
956value = new DateTimeOffset((DateTime)value);
System.Data.Entity (2)
System\Data\Common\EntitySql\AST\Literal.cs (1)
566return new DateTimeOffset(dateTime, offsetTimeSpan);
System\Data\Mapping\Update\Internal\Propagator.Evaluator.cs (1)
549return new DateTimeOffset(((DateTime)value).Ticks, TimeSpan.Zero);
System.Data.Linq (2)
DbConvert.cs (2)
136DateTimeOffset dto = new DateTimeOffset(); 147return new DateTimeOffset((DateTime)value);
System.Data.Services (3)
System\Data\Services\Epm\EpmSyndicationContentSerializer.cs (3)
177date = new DateTimeOffset((DateTime)propertyValue); 189date = new DateTimeOffset(result); 196date = new DateTimeOffset(Convert.ToDateTime(propertyValue, CultureInfo.InvariantCulture));
System.Runtime.Serialization (2)
System\Runtime\Serialization\DateTimeOffsetAdapter.cs (2)
48return new DateTimeOffset(value.UtcDateTime, new TimeSpan(0, value.OffsetMinutes, 0)); 55DateTimeOffset deserialized = new DateTimeOffset(value.UtcDateTime);
System.Xml (6)
System\Xml\BinaryXml\SqlUtils.cs (1)
882DateTimeOffset dto = new DateTimeOffset(dateTicks + timeTicks + zoneTicks, new TimeSpan(zoneTicks));
System\Xml\Schema\XmlValueConverter.cs (1)
1456return new DateTimeOffset(value);
System\Xml\Schema\XsdDateTime.cs (4)
455result = new DateTimeOffset(dt, new TimeSpan(xdt.ZoneHour, xdt.ZoneMinute, 0)); 458result = new DateTimeOffset(dt, new TimeSpan(-xdt.ZoneHour, -xdt.ZoneMinute, 0)); 461result = new DateTimeOffset(dt, new TimeSpan( 0 ) ); 465result = new DateTimeOffset(dt, TimeZoneInfo.Local.GetUtcOffset(dt));
697 references to DateTimeOffset
mscorlib (111)
system\datetimeoffset.cs (64)
39IComparable<DateTimeOffset>, IEquatable<DateTimeOffset> { 50public static readonly DateTimeOffset MinValue = new DateTimeOffset(DateTime.MinTicks, TimeSpan.Zero); 51public static readonly DateTimeOffset MaxValue = new DateTimeOffset(DateTime.MaxTicks, TimeSpan.Zero); 169public static DateTimeOffset Now { 175public static DateTimeOffset UtcNow { 205public DateTimeOffset ToOffset(TimeSpan offset) { 365public DateTimeOffset Add(TimeSpan timeSpan) { 375public DateTimeOffset AddDays(double days) { 385public DateTimeOffset AddHours(double hours) { 395public DateTimeOffset AddMilliseconds(double milliseconds) { 405public DateTimeOffset AddMinutes(double minutes) { 409public DateTimeOffset AddMonths(int months) { 419public DateTimeOffset AddSeconds(double seconds) { 427public DateTimeOffset AddTicks(long ticks) { 439public DateTimeOffset AddYears(int years) { 446public static int Compare(DateTimeOffset first, DateTimeOffset second) { 457if (!(obj is DateTimeOffset)) { 461DateTime objUtc = ((DateTimeOffset)obj).UtcDateTime; 468public int CompareTo(DateTimeOffset other) { 483if (obj is DateTimeOffset) { 484return UtcDateTime.Equals(((DateTimeOffset)obj).UtcDateTime); 489public bool Equals(DateTimeOffset other) { 493public bool EqualsExact(DateTimeOffset other) { 507public static bool Equals(DateTimeOffset first, DateTimeOffset second) { 515public static DateTimeOffset FromFileTime(long fileTime) { 519public static DateTimeOffset FromUnixTimeSeconds(long seconds) { 532public static DateTimeOffset FromUnixTimeMilliseconds(long milliseconds) { 592public static DateTimeOffset Parse(String input) { 605public static DateTimeOffset Parse(String input, IFormatProvider formatProvider) { 609public static DateTimeOffset Parse(String input, IFormatProvider formatProvider, DateTimeStyles styles) { 623public static DateTimeOffset ParseExact(String input, String format, IFormatProvider formatProvider) { 631public static DateTimeOffset ParseExact(String input, String format, IFormatProvider formatProvider, DateTimeStyles styles) { 642public static DateTimeOffset ParseExact(String input, String[] formats, IFormatProvider formatProvider, DateTimeStyles styles) { 653public TimeSpan Subtract(DateTimeOffset value) { 657public DateTimeOffset Subtract(TimeSpan value) { 694public DateTimeOffset ToLocalTime() { 698internal DateTimeOffset ToLocalTime(bool throwOnOverflow) 723public DateTimeOffset ToUniversalTime() { 727public static Boolean TryParse(String input, out DateTimeOffset result) { 739public static Boolean TryParse(String input, IFormatProvider formatProvider, DateTimeStyles styles, out DateTimeOffset result) { 753out DateTimeOffset result) { 768out DateTimeOffset result) { 833public static implicit operator DateTimeOffset (DateTime dateTime) { 837public static DateTimeOffset operator +(DateTimeOffset dateTimeOffset, TimeSpan timeSpan) { 842public static DateTimeOffset operator -(DateTimeOffset dateTimeOffset, TimeSpan timeSpan) { 846public static TimeSpan operator -(DateTimeOffset left, DateTimeOffset right) { 850public static bool operator ==(DateTimeOffset left, DateTimeOffset right) { 854public static bool operator !=(DateTimeOffset left, DateTimeOffset right) { 858public static bool operator <(DateTimeOffset left, DateTimeOffset right) { 862public static bool operator <=(DateTimeOffset left, DateTimeOffset right) { 866public static bool operator >(DateTimeOffset left, DateTimeOffset right) { 870public static bool operator >=(DateTimeOffset left, DateTimeOffset right) {
System\Diagnostics\Eventing\TraceLogging\SimpleTypeInfos.cs (2)
912: TraceLoggingTypeInfo<DateTimeOffset> 921public override void WriteData(TraceLoggingDataCollector collector, ref DateTimeOffset value)
System\Diagnostics\Eventing\TraceLogging\Statics.cs (1)
785else if (dataType == typeof(DateTimeOffset))
system\globalization\datetimeparse.cs (2)
2656if (offsetTicks < DateTimeOffset.MinOffset || offsetTicks > DateTimeOffset.MaxOffset) {
system\internal.cs (3)
108NullableHelper<DateTimeOffset>(); // For SQL 129new List<DateTimeOffset>(); 150SZArrayHelper<DateTimeOffset>(null);
system\io\isolatedstorage\isolatedstoragefile.cs (6)
689public DateTimeOffset GetCreationTime(string path) { 722DateTimeOffset ret = LongPathFile.GetCreationTime(fullPath); 730public DateTimeOffset GetLastAccessTime(string path) { 763DateTimeOffset ret = LongPathFile.GetLastAccessTime(fullPath); 771public DateTimeOffset GetLastWriteTime(string path) { 804DateTimeOffset ret = LongPathFile.GetLastWriteTime(fullPath);
system\io\longpath.cs (3)
324internal static DateTimeOffset GetCreationTime(String path) 345internal static DateTimeOffset GetLastAccessTime(String path) 365internal static DateTimeOffset GetLastWriteTime(String path)
system\runtime\interopservices\windowsruntime\clripropertyvalueimpl.cs (4)
173public DateTimeOffset GetDateTime() 178return (DateTimeOffset)_data; 317public DateTimeOffset[] GetDateTimeArray() 322return (DateTimeOffset[])_data;
system\runtime\interopservices\windowsruntime\clrireferenceimpl.cs (6)
327if (type == typeof(DateTimeOffset)) 328return new CLRIReferenceImpl<DateTimeOffset>(PropertyType.DateTime, (DateTimeOffset)obj); 404if (type == typeof(DateTimeOffset)) 405return new CLRIReferenceArrayImpl<DateTimeOffset>(PropertyType.DateTimeArray, (DateTimeOffset[])obj);
system\runtime\interopservices\windowsruntime\ipropertyvalue.cs (2)
73DateTimeOffset GetDateTime(); 130DateTimeOffset[] GetDateTimeArray();
system\stubhelpers.cs (5)
520internal static void ConvertToNative(ref DateTimeOffset managedDTO, out DateTimeNative dateTime) { 527internal static void ConvertToManaged(out DateTimeOffset managedLocalDTO, ref DateTimeNative nativeTicks) { 530DateTimeOffset managedUtcDTO = new DateTimeOffset(managedUtcTicks, TimeSpan.Zero); 797internal static unsafe void ConvertContentsToNative_DateTime(ref DateTimeOffset[] managedArray, IntPtr pNativeHome) 871internal static unsafe void ConvertContentsToManaged_DateTime(ref DateTimeOffset[] managedArray, IntPtr pNativeHome)
system\timezoneinfo.cs (13)
339public TimeSpan[] GetAmbiguousTimeOffsets(DateTimeOffset dateTimeOffset) { 428public TimeSpan GetUtcOffset(DateTimeOffset dateTimeOffset) { 494public Boolean IsAmbiguousTime(DateTimeOffset dateTimeOffset) { 499DateTimeOffset adjustedTime = TimeZoneInfo.ConvertTime(dateTimeOffset, this); 542public Boolean IsDaylightSavingTime(DateTimeOffset dateTimeOffset) { 658static public DateTimeOffset ConvertTimeBySystemTimeZoneId(DateTimeOffset dateTimeOffset, String destinationTimeZoneId) { 703static public DateTimeOffset ConvertTime(DateTimeOffset dateTimeOffset, TimeZoneInfo destinationTimeZone) { 716if (ticks > DateTimeOffset.MaxValue.Ticks) { 717return DateTimeOffset.MaxValue; 719else if (ticks < DateTimeOffset.MinValue.Ticks) { 720return DateTimeOffset.MinValue;
System (17)
compmod\system\componentmodel\DateTimeOffsetConverter.cs (15)
26/// <para>Provides a type converter to convert <see cref='System.DateTimeOffset'/> 34/// convert an object in the given source type to a <see cref='System.DateTimeOffset'/> 64return DateTimeOffset.MinValue; 76return DateTimeOffset.Parse(text, formatInfo); 79return DateTimeOffset.Parse(text, culture); 91/// <para>Converts the given value object to a <see cref='System.DateTimeOffset'/> 98if (destinationType == typeof(string) && value is DateTimeOffset) { 99DateTimeOffset dto = (DateTimeOffset) value; 100if (dto == DateTimeOffset.MinValue) { 139if (destinationType == typeof(InstanceDescriptor) && value is DateTimeOffset) { 140DateTimeOffset dto = (DateTimeOffset)value; 145ConstructorInfo ctr = typeof(DateTimeOffset).GetConstructor(new Type[] {typeof(Int64)}); 153ConstructorInfo ctor = typeof(DateTimeOffset).GetConstructor(new Type[] {
compmod\system\componentmodel\ReflectTypeDescriptionProvider.cs (1)
136temp[typeof(DateTimeOffset)] = typeof(DateTimeOffsetConverter);
net\System\Net\mail\SmtpDateTime.cs (1)
173DateTimeOffset offset = new DateTimeOffset(this.date, this.timeZone);
System.Activities (5)
System\Activities\Expressions\Literal.cs (4)
97if (valueType == typeof(DateTimeOffset)) 99DateTimeOffset literalValue = (DateTimeOffset)(object)this.Value; 137static bool IsShortTimeFormattingSafe(DateTimeOffset literalValue)
System\Activities\Tracking\EtwTrackingParticipant.cs (1)
179valueType == typeof(string) || valueType == typeof(DateTimeOffset))
System.Activities.DurableInstancing (3)
System\Activities\DurableInstancing\XmlPropertyBag.cs (3)
91else if (value is DateTimeOffset) 240else if (value is DateTimeOffset) 242return XmlConvert.ToString((DateTimeOffset)value);
System.Data (95)
fx\src\data\Microsoft\SqlServer\Server\MemoryRecordBuffer.cs (2)
120public override DateTimeOffset GetDateTimeOffset(SmiEventSink sink, int ordinal) { 217public override void SetDateTimeOffset(SmiEventSink sink, int ordinal, DateTimeOffset value) {
fx\src\data\Microsoft\SqlServer\Server\MetadataUtilsSmi.cs (2)
134ht.Add( typeof( System.DateTimeOffset ), ExtendedClrTypeCode.DateTimeOffset ); 359if (value.GetType() == typeof(DateTimeOffset) && smiVersion >= SmiContextFactory.KatmaiVersion)
fx\src\data\Microsoft\SqlServer\Server\SmiTypedGetterSetter.cs (2)
210public virtual DateTimeOffset GetDateTimeOffset(SmiEventSink sink, int ordinal) { 410public virtual void SetDateTimeOffset(SmiEventSink sink, int ordinal, DateTimeOffset value) {
fx\src\data\Microsoft\SqlServer\Server\SqlDataRecord.cs (2)
214public virtual DateTimeOffset GetDateTimeOffset(int ordinal) { 478public virtual void SetDateTimeOffset(int ordinal, DateTimeOffset value) {
fx\src\data\Microsoft\SqlServer\Server\SqlRecordBuffer.cs (2)
44[FieldOffset(0)] internal DateTimeOffset _dateTimeOffset; 120internal DateTimeOffset DateTimeOffset {
fx\src\data\Microsoft\SqlServer\Server\ValueUtilsSmi.cs (13)
202internal static DateTimeOffset GetDateTimeOffset(SmiEventSink_Default sink, ITypedGettersV3 getters, int ordinal, SmiMetaData metaData, bool gettersSupportKatmaiDateTime) { 211return (DateTimeOffset)result; 215internal static DateTimeOffset GetDateTimeOffset(SmiEventSink_Default sink, SmiTypedGetterSetter getters, int ordinal, SmiMetaData metaData) { 220return (DateTimeOffset)GetValue200(sink, getters, ordinal, metaData, null); 1408internal static void SetDateTimeOffset(SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, DateTimeOffset value, bool settersSupportKatmaiDateTime) { 1711SetDateTimeOffset_Unchecked(sink, setters, ordinal, (DateTimeOffset)value); 2011DateTimeOffset dto; 2015dto = (DateTimeOffset)reader.GetValue(i); 2295DateTimeOffset dto; 2302dto = (DateTimeOffset)record.GetValue(i); 3090private static DateTimeOffset GetDateTimeOffset_Unchecked(SmiEventSink_Default sink, SmiTypedGetterSetter getters, int ordinal) { 3093DateTimeOffset result = getters.GetDateTimeOffset(sink, ordinal); 3342private static void SetDateTimeOffset_Unchecked(SmiEventSink_Default sink, SmiTypedGetterSetter setters, int ordinal, DateTimeOffset value) {
fx\src\data\System\Data\Common\DataStorage.cs (1)
95typeof(DateTimeOffset),
fx\src\data\System\Data\Common\DateTimeOffsetStorage.cs (27)
17private static readonly DateTimeOffset defaultValue = DateTimeOffset.MinValue; 19private DateTimeOffset[] values; 22: base(column, typeof(DateTimeOffset), defaultValue, StorageType.DateTimeOffset) { 30DateTimeOffset min = DateTimeOffset.MaxValue; 34min=(DateTimeOffset.Compare(values[record],min) < 0) ? values[record] : min; 44DateTimeOffset max = DateTimeOffset.MinValue; 48max=(DateTimeOffset.Compare(values[record],max) >= 0) ? values[record] : max; 74throw ExprException.Overflow(typeof(DateTimeOffset)); 80DateTimeOffset valueNo1 = values[recordNo1]; 81DateTimeOffset valueNo2 = values[recordNo2]; 89return DateTimeOffset.Compare(valueNo1, valueNo2); 100DateTimeOffset valueNo1 = values[recordNo]; 104return DateTimeOffset.Compare(valueNo1, (DateTimeOffset)value); 110value = ((DateTimeOffset)value); 125DateTimeOffset value = values[record]; 139values[record] = (DateTimeOffset)value; 145DateTimeOffset[] newValues = new DateTimeOffset[capacity]; 158return XmlConvert.ToString((DateTimeOffset)value); 162return new DateTimeOffset[recordCount]; 166DateTimeOffset[] typedStore = (DateTimeOffset[]) store; 172values = (DateTimeOffset[]) store;
fx\src\data\System\Data\Common\SQLConvert.cs (5)
413public static DateTimeOffset ConvertStringToDateTimeOffset(string value, IFormatProvider formatProvider) { 414return DateTimeOffset.Parse(value, formatProvider); 533return ((DateTimeOffset)value).ToString(formatProvider); 563return (DateTimeOffset) value; 779return XmlConvert.ToString((DateTimeOffset)value);
fx\src\data\System\Data\Filter\BinaryNode.cs (3)
161return DateTimeOffset.Compare((DateTimeOffset)vLeft, (DateTimeOffset)vRight);
fx\src\data\System\Data\Filter\FunctionNode.cs (3)
37new Function("DateTimeOffset", FunctionId.DateTimeOffset, typeof(DateTimeOffset), false, true, 3, typeof(DateTime), typeof(int), typeof(int)), 464if (DateTimeOffset.Now.Offset.Hours != (int)argumentValues[1] && DateTimeOffset.Now.Offset.Minutes != (int)argumentValues[2]) {
fx\src\data\System\Data\Sql\SqlMetaData.cs (6)
1035public DateTimeOffset Adjust(DateTimeOffset value) { 1110else if (dataType == typeof(DateTimeOffset)) 1111value = this.Adjust((DateTimeOffset)value); 1298else if (dataType == typeof(DateTimeOffset)) 1299smd = new SqlMetaData(name, SqlDbType.DateTimeOffset, 0, InferScaleFromTimeTicks(((DateTimeOffset)value).Ticks));
fx\src\data\System\Data\SqlClient\SqlBuffer.cs (4)
374DateTimeOffset dto = this.DateTimeOffset; 409internal DateTimeOffset DateTimeOffset { 419return (DateTimeOffset)this.Value; // anything else we haven't thought of goes through boxing. 917internal void SetToDateTimeOffset(DateTimeOffset dateTimeOffset, byte scale) {
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (3)
2548virtual public DateTimeOffset GetDateTimeOffset(int i) { 2551DateTimeOffset dto = _data[i].DateTimeOffset; 2561dto = (DateTimeOffset) temp;
fx\src\data\System\Data\SqlClient\SqlDataReaderSmi.cs (1)
814public override DateTimeOffset GetDateTimeOffset(int ordinal) {
fx\src\data\System\Data\SqlClient\SqlEnums.cs (5)
342else if (dataType == typeof(DateTimeOffset)) { 408else if (sqlType == typeof(DateTimeOffset)) return DBNull.Value; 525else if (comVal is TimeSpan || comVal is DateTimeOffset) 832(255, 7, -1, false, false, false, TdsEnums.SQLDATETIMEOFFSET, TdsEnums.SQLDATETIMEOFFSET, MetaTypeName.DATETIMEOFFSET, typeof(System.DateTimeOffset), typeof(System.DateTimeOffset), SqlDbType.DateTimeOffset, DbType.DateTimeOffset, 1);
fx\src\data\System\Data\SqlClient\SqlParameter.cs (1)
953value = DateTimeOffset.Parse((string)value, (IFormatProvider)null);
fx\src\data\System\Data\SqlClient\SqlSymmetricKeyCache.cs (2)
104DateTimeOffset expirationTime = DateTimeOffset.UtcNow.Add(SqlConnection.ColumnEncryptionKeyCacheTtl);
fx\src\data\System\Data\SqlClient\TdsParser.cs (6)
5956WriteDateTimeOffset((DateTimeOffset)value, mt.Scale, length, stateObj); 6120WriteDateTimeOffset((DateTimeOffset)value, metatype.Scale, 10, stateObj); 6308private byte[] SerializeDateTimeOffset(DateTimeOffset value, byte scale, int length) { 6329private void WriteDateTimeOffset(DateTimeOffset value, byte scale, int length, TdsParserStateObject stateObj) { 10696WriteDateTimeOffset((DateTimeOffset)value, scale, actualLength, stateObj); 10905return SerializeDateTimeOffset((DateTimeOffset)value, scale, actualLength);
fx\src\data\System\Data\SqlClient\TdsRecordBufferSetter.cs (1)
185public override void SetDateTimeOffset(SmiEventSink sink, int ordinal, DateTimeOffset value) {
fx\src\data\System\Data\SqlClient\TdsValueSetter.cs (1)
566internal void SetDateTimeOffset(DateTimeOffset value) {
fx\src\data\System\Data\xmlsaver.cs (3)
181else if ((dt.Length == 0) || bImplementsInullable || ((dt == Keywords.XSD_ANYTYPE) && (col.XmlDataType != Keywords.XSD_ANYTYPE))|| (col.DataType == typeof(DateTimeOffset))) { 246if (type == typeof(object) || type == typeof(SqlXml) || type == typeof(DateTimeOffset)) 1137if ((col.IsSqlType && ((dt.Length == 0) || col.ImplementsINullable)) || (typeof(SqlXml) == col.DataType) || col.DataType == typeof(DateTimeOffset) || col.DataType == typeof(System.Numerics.BigInteger)) { // no need to check if it is Sql typee if it already implements INullable,
System.Data.Entity (91)
System\Data\Common\CommandTrees\AbstractExpressions.cs (3)
475/// Creates a <see cref="DbExpression"/> that represents the specified (nullable) <see cref="DateTimeOffset"/> value 479public static DbExpression FromDateTimeOffset(DateTimeOffset? value) 488public static implicit operator DbExpression(DateTimeOffset? value)
System\Data\Common\CommandTrees\Internal\ExpressionKeyGen.cs (1)
245_key.Append(((DateTimeOffset)e.Value).ToString("o", CultureInfo.InvariantCulture));
System\Data\Common\EntitySql\AST\Literal.cs (1)
526private static DateTimeOffset ConvertDateTimeOffsetLiteralValue(ErrorContext errCtx, string datetimeLiteralValue)
System\Data\Common\Internal\Materialization\Translator.cs (1)
2194typeof(DateTimeOffset) == type)
System\Data\EntityModel\SchemaObjectModel\ScalarType.cs (2)
246DateTimeOffset temp; 247if (!DateTimeOffset.TryParse(text, out temp))
System\Data\Mapping\Update\Internal\Propagator.Evaluator.cs (1)
547if ( (value is DateTime) && (clrPrimitiveType == typeof(DateTimeOffset)))
System\Data\Mapping\Update\Internal\Propagator.ExtentPlaceholderCreator.cs (1)
61typeDefaultMap[PrimitiveTypeKind.DateTimeOffset] = default(DateTimeOffset);
System\Data\Metadata\Edm\PrimitiveType.cs (1)
162return typeof(DateTimeOffset);
System\Data\Metadata\Edm\Provider\ClrProviderManifest.cs (2)
131else if (typeof(DateTimeOffset) == clrType) 211primitiveTypes[(int)PrimitiveTypeKind.DateTimeOffset] = CreatePrimitiveType(typeof(DateTimeOffset), PrimitiveTypeKind.DateTimeOffset);
System\Data\Metadata\Edm\Provider\EdmProviderManifest.cs (1)
171InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.DateTimeOffset], PrimitiveTypeKind.DateTimeOffset, EdmConstants.DateTimeOffset, typeof(DateTimeOffset));
System\Data\Metadata\TypeHelpers.cs (1)
723else if (clrType == typeof(System.DateTimeOffset))
System\Data\Objects\DataClasses\StructuralObject.cs (8)
686protected internal static DateTimeOffset SetValidValue(DateTimeOffset value, string propertyName) 702protected internal static DateTimeOffset SetValidValue(DateTimeOffset value) 720protected internal static Nullable<DateTimeOffset> SetValidValue(Nullable<DateTimeOffset> value, string propertyName) 736protected internal static Nullable<DateTimeOffset> SetValidValue(Nullable<DateTimeOffset> value)
System\Data\Objects\ELinq\Translator.cs (8)
546yield return typeof(DateTimeOffset).GetProperty("Year", BindingFlags.Public | BindingFlags.Instance); 547yield return typeof(DateTimeOffset).GetProperty("Month", BindingFlags.Public | BindingFlags.Instance); 548yield return typeof(DateTimeOffset).GetProperty("Day", BindingFlags.Public | BindingFlags.Instance); 549yield return typeof(DateTimeOffset).GetProperty("Hour", BindingFlags.Public | BindingFlags.Instance); 550yield return typeof(DateTimeOffset).GetProperty("Minute", BindingFlags.Public | BindingFlags.Instance); 551yield return typeof(DateTimeOffset).GetProperty("Second", BindingFlags.Public | BindingFlags.Instance); 552yield return typeof(DateTimeOffset).GetProperty("Millisecond", BindingFlags.Public | BindingFlags.Instance); 575yield return GetProperty(typeof(DateTimeOffset), "Now", BindingFlags.Public | BindingFlags.Static, ExpressionConverter.CurrentDateTimeOffset);
System\Data\Objects\EntityFunctions.cs (40)
513public static System.Int32? GetTotalOffsetMinutes(System.DateTimeOffset? dateTimeOffsetArgument) 522public static System.DateTimeOffset? TruncateTime(System.DateTimeOffset? dateValue) 549public static System.DateTimeOffset? CreateDateTimeOffset(System.Int32? year, System.Int32? month, System.Int32? day, System.Int32? hour, System.Int32? minute, System.Double? second, System.Int32? timeZoneOffset) 567public static System.DateTimeOffset? AddYears(System.DateTimeOffset? dateValue, System.Int32? addValue) 585public static System.DateTimeOffset? AddMonths(System.DateTimeOffset? dateValue, System.Int32? addValue) 603public static System.DateTimeOffset? AddDays(System.DateTimeOffset? dateValue, System.Int32? addValue) 621public static System.DateTimeOffset? AddHours(System.DateTimeOffset? timeValue, System.Int32? addValue) 648public static System.DateTimeOffset? AddMinutes(System.DateTimeOffset? timeValue, System.Int32? addValue) 675public static System.DateTimeOffset? AddSeconds(System.DateTimeOffset? timeValue, System.Int32? addValue) 702public static System.DateTimeOffset? AddMilliseconds(System.DateTimeOffset? timeValue, System.Int32? addValue) 729public static System.DateTimeOffset? AddMicroseconds(System.DateTimeOffset? timeValue, System.Int32? addValue) 756public static System.DateTimeOffset? AddNanoseconds(System.DateTimeOffset? timeValue, System.Int32? addValue) 783public static System.Int32? DiffYears(System.DateTimeOffset? dateValue1, System.DateTimeOffset? dateValue2) 801public static System.Int32? DiffMonths(System.DateTimeOffset? dateValue1, System.DateTimeOffset? dateValue2) 819public static System.Int32? DiffDays(System.DateTimeOffset? dateValue1, System.DateTimeOffset? dateValue2) 837public static System.Int32? DiffHours(System.DateTimeOffset? timeValue1, System.DateTimeOffset? timeValue2) 864public static System.Int32? DiffMinutes(System.DateTimeOffset? timeValue1, System.DateTimeOffset? timeValue2) 891public static System.Int32? DiffSeconds(System.DateTimeOffset? timeValue1, System.DateTimeOffset? timeValue2) 918public static System.Int32? DiffMilliseconds(System.DateTimeOffset? timeValue1, System.DateTimeOffset? timeValue2) 945public static System.Int32? DiffMicroseconds(System.DateTimeOffset? timeValue1, System.DateTimeOffset? timeValue2) 972public static System.Int32? DiffNanoseconds(System.DateTimeOffset? timeValue1, System.DateTimeOffset? timeValue2)
System\Data\Objects\SqlClient\SqlFunctions.cs (19)
671public static System.DateTimeOffset? DateAdd(System.String datePartArg, System.Double? number, System.DateTimeOffset? dateTimeOffsetArg) 698public static System.Int32? DateDiff(System.String datePartArg, System.DateTimeOffset? startDate, System.DateTimeOffset? endDate) 725public static System.Int32? DateDiff(System.String datePartArg, System.String startDate, System.DateTimeOffset? endDate) 761public static System.Int32? DateDiff(System.String datePartArg, System.DateTimeOffset? startDate, System.String endDate) 788public static System.Int32? DateDiff(System.String datePartArg, System.TimeSpan? startDate, System.DateTimeOffset? endDate) 806public static System.Int32? DateDiff(System.String datePartArg, System.DateTimeOffset? startDate, System.TimeSpan? endDate) 815public static System.Int32? DateDiff(System.String datePartArg, System.DateTime? startDate, System.DateTimeOffset? endDate) 824public static System.Int32? DateDiff(System.String datePartArg, System.DateTimeOffset? startDate, System.DateTime? endDate) 860public static System.String DateName(System.String datePartArg, System.DateTimeOffset? date) 878public static System.Int32? DatePart(System.String datePartArg, System.DateTimeOffset? date) 968public static System.Int32? DataLength(System.DateTimeOffset? arg) 1058public static System.Int32? Checksum(System.DateTimeOffset? arg1) 1139public static System.Int32? Checksum(System.DateTimeOffset? arg1, System.DateTimeOffset? arg2) 1211public static System.Int32? Checksum(System.DateTimeOffset? arg1, System.DateTimeOffset? arg2, System.DateTimeOffset? arg3)
System\Data\SqlClient\SqlGen\SqlGenerator.cs (1)
959result.Append(EscapeSingleQuote(((System.DateTimeOffset)e.Value).ToString("yyyy-MM-dd HH:mm:ss.fffffff zzz", CultureInfo.InvariantCulture), false /* IsUnicode */));
System.Data.Entity.Design (3)
System\Data\EntityModel\Emitters\PropertyEmitter.cs (2)
776DateTimeOffset dateTimeOffset = (DateTimeOffset)value;
System\Data\EntityModel\Emitters\TypeReference.cs (1)
287_dateTimeOffset = ForType(typeof(System.DateTimeOffset));
System.Data.Linq (74)
DbConvert.cs (7)
120else if (fromType == typeof(DateTimeOffset)) { 121return DateTimeOffset.Parse(value.ToString(), Globalization.CultureInfo.InvariantCulture).TimeOfDay; 135else if (toType == typeof(DateTimeOffset)) { 136DateTimeOffset dto = new DateTimeOffset(); 143else if (toType == typeof(DateTime) && fromType == typeof(DateTimeOffset)) { 144return ((DateTimeOffset)value).DateTime; 146else if (toType == typeof(DateTimeOffset) && fromType == typeof(DateTime)) {
parent\DbmlShared\Mapping.cs (1)
535if (type == typeof(Guid) || type == typeof(DateTime) || type == typeof(DateTimeOffset) ||
SqlClient\Common\SqlFactory.cs (3)
222Type returnType = asNullable ? typeof(DateTimeOffset?) : typeof(DateTimeOffset); 261return ConvertTo(typeof(DateTimeOffset), result);
SqlClient\Common\TypeSystem.cs (1)
220return (typeof(TimeSpan) == type) || (typeof(DateTimeOffset) == type);
SqlClient\Query\SqlMethodCallConverter.cs (21)
268if (!mc.Method.IsStatic && mc.Method.DeclaringType == typeof(DateTimeOffset)) { 573if (m.Expression.ClrType == typeof(DateTimeOffset)) { 666if (leftType == typeof(DateTime) || leftType == typeof(DateTimeOffset)) { 711else if (sox.ClrType == typeof(DateTimeOffset)) { 783if (sox.ClrType == typeof(DateTimeOffset)) { 787return sql.FunctionCall(typeof(DateTimeOffset), "TODATETIMEOFFSET", 794return sql.FunctionCall(typeof(DateTimeOffset), "TODATETIMEOFFSET", 833result = sql.FunctionCall(typeof(DateTimeOffset), "CONVERT", new SqlExpression[3] { datetimeoffset, dateAndTime, sql.ValueFromObject(120, false, source) }, source); 842result = sql.FunctionCall(typeof(DateTimeOffset), "CONVERT", new SqlExpression[3] { datetimeoffset, dateAndTime, sql.ValueFromObject(121, false, source) }, source); 848return sql.FunctionCall(typeof(DateTimeOffset), "TODATETIMEOFFSET", 972else if (declType == typeof(DateTimeOffset)) { 1308if (rightType == typeof(DateTimeOffset)) { 1309Debug.Assert(TypeSystem.GetNonNullableType(bo.Left.ClrType) == typeof(DateTimeOffset)); 1321SqlExpression startPlusDays = sql.FunctionCall(typeof(DateTimeOffset), "DATEADD", new SqlExpression[] { day, intDays, start }, bo.SourceExpression); 1323SqlExpression startPlusDaysPlusMsec = sql.FunctionCall(typeof(DateTimeOffset), "DATEADD", new SqlExpression[] { ms, intMSec, startPlusDays }, bo.SourceExpression); 1325SqlExpression startPlusDaysPlusMsecPlusUSec = sql.FunctionCall(typeof(DateTimeOffset), "DATEADD", new SqlExpression[] { us, intUSec, startPlusDaysPlusMsec }, bo.SourceExpression); 1327SqlExpression startPlusDaysPlusMsecPlusUSecPlusNSec = sql.FunctionCall(typeof(DateTimeOffset), "DATEADD", new SqlExpression[] { ns, intNSec, startPlusDaysPlusMsecPlusUSec }, bo.SourceExpression); 1363return TypeSystem.GetNonNullableType(bo.Left.ClrType) == typeof(DateTimeOffset) ? 1380} else if (TypeSystem.GetNonNullableType(bo.Left.ClrType) == typeof(DateTimeOffset)) { 2178else if (baseClrTypeOfExpr == typeof(DateTime) || baseClrTypeOfExpr == typeof(DateTimeOffset)) { 2209Debug.Assert(baseClrTypeOfExpr == typeof(DateTimeOffset), "'DateTime' property supported only for instances of DateTimeOffset.");
SqlClient\Query\SqlMethodTransformer.cs (1)
85return (expected == typeof(DateTime) && actual == typeof(DateTimeOffset));
SqlClient\SqlBuilder.cs (1)
285} else if (type == typeof(DateTimeOffset)) {
SqlClient\SqlMethods.cs (36)
47public static int DateDiffYear(DateTimeOffset startDate, DateTimeOffset endDate) 60public static int? DateDiffYear(DateTimeOffset? startDate, DateTimeOffset? endDate) 105public static int DateDiffMonth(DateTimeOffset startDate, DateTimeOffset endDate) 118public static int? DateDiffMonth(DateTimeOffset? startDate, DateTimeOffset? endDate) 164public static int DateDiffDay(DateTimeOffset startDate, DateTimeOffset endDate) 176public static int? DateDiffDay(DateTimeOffset? startDate, DateTimeOffset? endDate) 223public static int DateDiffHour(DateTimeOffset startDate, DateTimeOffset endDate) 235public static int? DateDiffHour(DateTimeOffset? startDate, DateTimeOffset? endDate) 282public static int DateDiffMinute(DateTimeOffset startDate, DateTimeOffset endDate) 295public static int? DateDiffMinute(DateTimeOffset? startDate, DateTimeOffset? endDate) 342public static int DateDiffSecond(DateTimeOffset startDate, DateTimeOffset endDate) 355public static int? DateDiffSecond(DateTimeOffset? startDate, DateTimeOffset? endDate) 402public static int DateDiffMillisecond(DateTimeOffset startDate, DateTimeOffset endDate) 415public static int? DateDiffMillisecond(DateTimeOffset? startDate, DateTimeOffset? endDate) 468public static int DateDiffMicrosecond(DateTimeOffset startDate, DateTimeOffset endDate) 481public static int? DateDiffMicrosecond(DateTimeOffset? startDate, DateTimeOffset? endDate) 534public static int DateDiffNanosecond(DateTimeOffset startDate, DateTimeOffset endDate) 546public static int? DateDiffNanosecond(DateTimeOffset? startDate, DateTimeOffset? endDate)
SqlClient\SqlTypeSystemProvider.cs (3)
98return typeof(DateTimeOffset); 1170return From(typeof(DateTimeOffset)); 1522type == typeof(DateTimeOffset))
System.Data.Services (11)
System\Data\Services\Epm\EpmSyndicationContentDeSerializer.cs (2)
102if (this.Item.LastUpdatedTime > DateTimeOffset.MinValue) 109if (this.Item.PublishDate > DateTimeOffset.MinValue)
System\Data\Services\Epm\EpmSyndicationContentSerializer.cs (6)
160private static DateTimeOffset GetDate(object propertyValue, string exceptionMsg) 164return DateTimeOffset.Now; 167DateTimeOffset date; 169if (propertyValue is DateTimeOffset) 171date = (DateTimeOffset)propertyValue; 181if (!DateTimeOffset.TryParse((String)propertyValue, out date))
System\Data\Services\Providers\ReflectionServiceProvider.cs (1)
412type == typeof(TimeSpan) || type == typeof(DateTimeOffset) || type == typeof(Uri) ||
System\Data\Services\Serializers\SyndicationSerializer.cs (2)
61private readonly DateTimeOffset lastUpdatedTime = DateTimeOffset.UtcNow;
System.Data.Services.Client (2)
System\Data\Services\Client\ClientConvert.cs (2)
319return XmlConvert.ToString((DateTimeOffset)propertyValue); 469types[(int)StorageType.DateTimeOffset] = typeof(DateTimeOffset);
System.Runtime.Caching (23)
System\Caching\CacheEntryChangeMonitor.cs (1)
11public abstract DateTimeOffset LastModified { get; }
System\Caching\CacheItemPolicy.cs (2)
9private DateTimeOffset _absExpiry; 16public DateTimeOffset AbsoluteExpiration {
System\Caching\FileChangeMonitor.cs (1)
10public abstract DateTimeOffset LastModified { get; }
System\Caching\FileChangeNotificationSystem.cs (1)
77void IFileChangeNotificationSystem.StartMonitoring(string filePath, OnChangedCallback onChangedCallback, out Object state, out DateTimeOffset lastWriteTime, out long fileSize) {
System\Caching\HostFileChangeMonitor.cs (4)
24private DateTimeOffset _lastModified; 34DateTimeOffset lastWrite; 52DateTimeOffset lastWrite; 129public override DateTimeOffset LastModified { get { return _lastModified; } }
System\Caching\Hosting\IFileChangeNotificationSystem.cs (1)
8void StartMonitoring(string filePath, OnChangedCallback onChangedCallback, out Object state, out DateTimeOffset lastWriteTime, out long fileSize);
System\Caching\MemoryCache.cs (5)
335DateTimeOffset absExp = ObjectCache.InfiniteAbsoluteExpiration; 506public override object AddOrGetExisting(string key, object value, DateTimeOffset absoluteExpiration, string regionName = null) { 542public override void Set(string key, object value, DateTimeOffset absoluteExpiration, string regionName = null) { 566DateTimeOffset absExp = ObjectCache.InfiniteAbsoluteExpiration; 603DateTimeOffset absoluteExpiration,
System\Caching\MemoryCacheEntry.cs (1)
94DateTimeOffset absExp,
System\Caching\MemoryCacheEntryChangeMonitor.cs (2)
20private DateTimeOffset _lastModified; 112public override DateTimeOffset LastModified { get { return _lastModified; } }
System\Caching\ObjectCache.cs (5)
19public static readonly DateTimeOffset InfiniteAbsoluteExpiration = DateTimeOffset.MaxValue; 65public virtual bool Add(string key, object value, DateTimeOffset absoluteExpiration, string regionName = null) { 79public abstract object AddOrGetExisting(string key, object value, DateTimeOffset absoluteExpiration, string regionName = null); 94public abstract void Set(string key, object value, DateTimeOffset absoluteExpiration, string regionName = null);
System.Runtime.Serialization (4)
System\Runtime\Serialization\DateTimeOffsetAdapter.cs (3)
41public static DateTimeOffset GetDateTimeOffset(DateTimeOffsetAdapter value) 55DateTimeOffset deserialized = new DateTimeOffset(value.UtcDateTime); 65public static DateTimeOffsetAdapter GetDateTimeOffsetAdapter(DateTimeOffset value)
System\Runtime\Serialization\Globals.cs (1)
190typeOfDateTimeOffset = typeof(DateTimeOffset);
System.ServiceModel (33)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (14)
432internal void WriteFeedLastUpdatedTimeTo(XmlWriter writer, DateTimeOffset lastUpdatedTime, bool isRequired) 434if (lastUpdatedTime == DateTimeOffset.MinValue && isRequired) 436lastUpdatedTime = DateTimeOffset.UtcNow; 438if (lastUpdatedTime != DateTimeOffset.MinValue) 467internal void WriteItemLastUpdatedTimeTo(XmlWriter writer, DateTimeOffset lastUpdatedTime) 469if (lastUpdatedTime == DateTimeOffset.MinValue) 471lastUpdatedTime = DateTimeOffset.UtcNow; 643string AsString(DateTimeOffset dateTime) 655DateTimeOffset DateFromString(string dateTimeString, XmlReader reader) 674DateTimeOffset localTime; 675if (DateTimeOffset.TryParseExact(dateTimeString, Rfc3339LocalDateTimeFormat, 681DateTimeOffset utcTime; 682if (DateTimeOffset.TryParseExact(dateTimeString, Rfc3339UTCDateTimeFormat, 1279if (item.PublishDate != DateTimeOffset.MinValue)
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (7)
262static DateTimeOffset DateFromString(string dateTimeString, XmlReader reader) 309DateTimeOffset theTime; 319if (DateTimeOffset.TryParseExact(wellFormattedString, parseFormat, 463string AsString(DateTimeOffset dateTime) 1145if (this.Feed.LastUpdatedTime > DateTimeOffset.MinValue) 1337if (item.PublishDate > DateTimeOffset.MinValue) 1379if (item.LastUpdatedTime > DateTimeOffset.MinValue)
System\ServiceModel\Syndication\SyndicationFeed.cs (5)
35DateTimeOffset lastUpdatedTime; 55: this(title, description, feedAlternateLink, null, DateTimeOffset.MinValue, items) 59public SyndicationFeed(string title, string description, Uri feedAlternateLink, string id, DateTimeOffset lastUpdatedTime) 64public SyndicationFeed(string title, string description, Uri feedAlternateLink, string id, DateTimeOffset lastUpdatedTime, IEnumerable<SyndicationItem> items) 232public DateTimeOffset LastUpdatedTime
System\ServiceModel\Syndication\SyndicationItem.cs (7)
29DateTimeOffset lastUpdatedTime; 31DateTimeOffset publishDate; 42: this(title, content, itemAlternateLink, null, DateTimeOffset.MinValue) 46public SyndicationItem(string title, string content, Uri itemAlternateLink, string id, DateTimeOffset lastUpdatedTime) 51public SyndicationItem(string title, SyndicationContent content, Uri itemAlternateLink, string id, DateTimeOffset lastUpdatedTime) 162public DateTimeOffset LastUpdatedTime 180public DateTimeOffset PublishDate
System.ServiceModel.Web (8)
System\ServiceModel\Dispatcher\JsonQueryStringConverter.cs (2)
130else if (parameterType == typeof(DateTimeOffset)) 134return default(DateTimeOffset);
System\ServiceModel\Dispatcher\QueryStringConverter.cs (6)
50this.defaultSupportedQueryStringTypes.Add(typeof(DateTimeOffset), null); 132else if (parameterType == typeof(DateTimeOffset)) 134return (parameter == null) ? default(DateTimeOffset) : DateTimeOffset.Parse(parameter, CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind | DateTimeStyles.AllowWhiteSpaces); 225else if (parameterType == typeof(DateTimeOffset)) 227return XmlConvert.ToString((DateTimeOffset) parameter);
System.Web (6)
Hosting\ObjectCacheHost.cs (1)
59void IFileChangeNotificationSystem.StartMonitoring(string filePath, OnChangedCallback onChangedCallback, out Object state, out DateTimeOffset lastWrite, out long fileSize) {
UI\WebControls\DataBoundControlHelper.cs (1)
97(type == typeof(DateTimeOffset)) ||
UI\WebControls\Parameter.cs (2)
262if (value is DateTimeOffset) { 265return DateTimeOffset.Parse(value.ToString(), CultureInfo.CurrentCulture);
Util\AppVerifier.cs (2)
740public readonly DateTimeOffset Timestamp; 745Timestamp = DateTimeOffset.UtcNow; // UTC is faster, will convert to local on error
System.Web.DataVisualization (4)
Common\DataManager\DataPoint.cs (4)
1010else if (yValue[0] is DateTimeOffset) 1061if(xValue is DateTimeOffset) 1082else if (yValue[0] is DateTimeOffset) 1514else if (columnDataType == typeof(DateTimeOffset))
System.Web.DynamicData (2)
DynamicData\FieldTemplateFactory.cs (1)
87_typesFallBacks[typeof(DateTimeOffset)] = typeof(string);
DynamicData\MetaColumn.cs (1)
327if (ColumnType == typeof(DateTimeOffset)) return true;
System.Web.Entity (3)
System\Data\WebControls\EntityDataSourceUtil.cs (1)
427return typeof(DateTimeOffset);
System\Data\WebControls\WebControlParameterProxy.cs (2)
121object value = (paramValue is DateTimeOffset) 123: DateTimeOffset.Parse(this.Value.ToString(), CultureInfo.CurrentCulture);
System.Web.Extensions (14)
Compilation\WCFModel\VSWCFServiceContractGenerator.cs (1)
124typeof(DateTimeOffset),
Script\Serialization\JavaScriptSerializer.cs (2)
436if (o is DateTimeOffset) { 438SerializeDateTime(((DateTimeOffset)o).UtcDateTime, sb, serializationFormat);
UI\WebControls\Dynamic.cs (11)
512void F(DateTimeOffset x, DateTimeOffset y); 516void F(DateTimeOffset? x, DateTimeOffset? y); 531void F(DateTimeOffset x, TimeSpan y); 534void F(DateTimeOffset? x, TimeSpan? y); 541void F(DateTimeOffset x, DateTimeOffset y); 543void F(DateTimeOffset? x, DateTimeOffset? y); 615typeof(DateTimeOffset),
System.Windows.Forms.DataVisualization (4)
Common\DataManager\DataPoint.cs (4)
1010else if (yValue[0] is DateTimeOffset) 1061if(xValue is DateTimeOffset) 1082else if (yValue[0] is DateTimeOffset) 1514else if (columnDataType == typeof(DateTimeOffset))
System.Xml (163)
System\Xml\BinaryXml\SqlUtils.cs (14)
856public static DateTimeOffset XsdKatmaiDateToDateTimeOffset( byte[] data, int offset ) { 858return (DateTimeOffset)XsdKatmaiDateToDateTime(data, offset); 861public static DateTimeOffset XsdKatmaiDateTimeToDateTimeOffset(byte[] data, int offset) { 863return (DateTimeOffset)XsdKatmaiDateTimeToDateTime(data, offset); 866public static DateTimeOffset XsdKatmaiTimeToDateTimeOffset(byte[] data, int offset) { 868return (DateTimeOffset)XsdKatmaiTimeToDateTime(data, offset); 871public static DateTimeOffset XsdKatmaiDateOffsetToDateTimeOffset(byte[] data, int offset) { 876public static DateTimeOffset XsdKatmaiDateTimeOffsetToDateTimeOffset(byte[] data, int offset) { 882DateTimeOffset dto = new DateTimeOffset(dateTicks + timeTicks + zoneTicks, new TimeSpan(zoneTicks)); 886public static DateTimeOffset XsdKatmaiTimeOffsetToDateTimeOffset(byte[] data, int offset) { 916DateTimeOffset dto = XsdKatmaiDateOffsetToDateTimeOffset(data, offset); 924DateTimeOffset dto = XsdKatmaiDateTimeOffsetToDateTimeOffset(data, offset); 934DateTimeOffset dto = XsdKatmaiTimeOffsetToDateTimeOffset(data, offset); 981static int GetFractions(DateTimeOffset dt) {
System\Xml\BinaryXml\XmlBinaryReader.cs (2)
2916Type TypeOfDateTimeOffset = typeof( System.DateTimeOffset ); 3401DateTimeOffset ValueAsDateTimeOffset() {
System\Xml\Core\XmlAsyncCheckReader.cs (1)
271public override DateTimeOffset ReadContentAsDateTimeOffset() {
System\Xml\Core\XmlAsyncCheckWriter.cs (1)
232public override void WriteValue(DateTimeOffset value) {
System\Xml\Core\XmlAutoDetectWriter.cs (1)
209public override void WriteValue(DateTimeOffset value) {
System\Xml\Core\XmlRawWriter.cs (1)
190public override void WriteValue(DateTimeOffset value) {
System\Xml\Core\XmlReader.cs (1)
239public virtual DateTimeOffset ReadContentAsDateTimeOffset() {
System\Xml\Core\XmlWellFormedWriter.cs (1)
1192public override void WriteValue(DateTimeOffset value) {
System\Xml\Core\XmlWrappingWriter.cs (1)
186public override void WriteValue(DateTimeOffset value) {
System\Xml\Core\XmlWriter.cs (1)
291public virtual void WriteValue(DateTimeOffset value) {
System\Xml\Core\XsdValidatingReader.cs (2)
595if (returnType == typeof(DateTimeOffset) && xmlType.Datatype is Datatype_dateTimeBase) { 854if (returnType == typeof(DateTimeOffset) && xmlType.Datatype is Datatype_dateTimeBase) {
System\Xml\Core\XsdValidatingReaderAsync.cs (2)
77if (returnType == typeof(DateTimeOffset) && xmlType.Datatype is Datatype_dateTimeBase) { 155if (returnType == typeof(DateTimeOffset) && xmlType.Datatype is Datatype_dateTimeBase) {
System\Xml\Schema\XmlValueConverter.cs (122)
165public abstract bool ToBoolean(DateTimeOffset value); 176public abstract int ToInt32(DateTimeOffset value); 187public abstract long ToInt64(DateTimeOffset value); 198public abstract decimal ToDecimal(DateTimeOffset value); 209public abstract double ToDouble(DateTimeOffset value); 220public abstract float ToSingle(DateTimeOffset value); 231public abstract DateTime ToDateTime(DateTimeOffset value); 235public abstract DateTimeOffset ToDateTimeOffset(bool value); 236public abstract DateTimeOffset ToDateTimeOffset(int value); 237public abstract DateTimeOffset ToDateTimeOffset(long value); 238public abstract DateTimeOffset ToDateTimeOffset(decimal value); 239public abstract DateTimeOffset ToDateTimeOffset(float value); 240public abstract DateTimeOffset ToDateTimeOffset(double value); 241public abstract DateTimeOffset ToDateTimeOffset(DateTime value); 242public abstract DateTimeOffset ToDateTimeOffset(DateTimeOffset value); 243public abstract DateTimeOffset ToDateTimeOffset(string value); 244public abstract DateTimeOffset ToDateTimeOffset(object value); 253public abstract string ToString(DateTimeOffset value); 266public abstract object ChangeType(DateTimeOffset value, Type destinationType); 355protected static readonly Type DateTimeOffsetType = typeof(DateTimeOffset); 365public override bool ToBoolean(DateTimeOffset value) {return (bool) ChangeType((object) value, BooleanType, null); } 376public override DateTime ToDateTime(DateTimeOffset value) {return (DateTime) ChangeType((object) value, DateTimeType, null); } 385public override DateTimeOffset ToDateTimeOffset(bool value) {return (DateTimeOffset) ChangeType((object) value, DateTimeOffsetType, null); } 386public override DateTimeOffset ToDateTimeOffset(DateTime value) {return (DateTimeOffset) ChangeType((object) value, DateTimeOffsetType, null); } 387public override DateTimeOffset ToDateTimeOffset(DateTimeOffset value) {return (DateTimeOffset) ChangeType((object) value, DateTimeOffsetType, null); } 388public override DateTimeOffset ToDateTimeOffset(decimal value) {return (DateTimeOffset) ChangeType((object) value, DateTimeOffsetType, null); } 389public override DateTimeOffset ToDateTimeOffset(double value) {return (DateTimeOffset) ChangeType((object) value, DateTimeOffsetType, null); } 390public override DateTimeOffset ToDateTimeOffset(int value) {return (DateTimeOffset) ChangeType((object) value, DateTimeOffsetType, null); } 391public override DateTimeOffset ToDateTimeOffset(long value) {return (DateTimeOffset) ChangeType((object) value, DateTimeOffsetType, null); } 392public override DateTimeOffset ToDateTimeOffset(float value) {return (DateTimeOffset) ChangeType((object) value, DateTimeOffsetType, null); } 393public override DateTimeOffset ToDateTimeOffset(string value) {return (DateTimeOffset) ChangeType((object) value, DateTimeOffsetType, null); } 394public override DateTimeOffset ToDateTimeOffset(object value) {return (DateTimeOffset) ChangeType((object) value, DateTimeOffsetType, null); } 398public override decimal ToDecimal(DateTimeOffset value) {return (decimal) ChangeType((object) value, DecimalType, null); } 409public override double ToDouble(DateTimeOffset value) {return (double) ChangeType((object) value, DoubleType, null); } 420public override int ToInt32(DateTimeOffset value) {return (int) ChangeType((object) value, Int32Type, null); } 431public override long ToInt64(DateTimeOffset value) {return (long) ChangeType((object) value, Int64Type, null); } 442public override float ToSingle(DateTimeOffset value) {return (float) ChangeType((object) value, SingleType, null); } 453public override string ToString(DateTimeOffset value) {return (string) ChangeType((object) value, StringType, null); } 466public override object ChangeType(DateTimeOffset value, Type destinationType) {return (object) ChangeType((object) value, destinationType, null); } 622protected static DateTimeOffset StringToDateOffset(string value) { 623return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.Date)); 626protected static DateTimeOffset StringToDateTimeOffset(string value) { 627return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.DateTime)); 630protected static DateTimeOffset StringToGDayOffset(string value) { 631return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.GDay)); 634protected static DateTimeOffset StringToGMonthOffset(string value) { 635return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.GMonth)); 638protected static DateTimeOffset StringToGMonthDayOffset(string value) { 639return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.GMonthDay)); 642protected static DateTimeOffset StringToGYearOffset(string value) { 643return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.GYear)); 646protected static DateTimeOffset StringToGYearMonthOffset(string value) { 647return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.GYearMonth)); 689protected static DateTimeOffset StringToTimeOffset(string value) { 690return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.Time)); 747protected static string DateOffsetToString(DateTimeOffset value) { 751protected static string DateTimeOffsetToString(DateTimeOffset value) { 755protected static string GDayOffsetToString(DateTimeOffset value) { 759protected static string GMonthOffsetToString(DateTimeOffset value) { 763protected static string GMonthDayOffsetToString(DateTimeOffset value) { 767protected static string GYearOffsetToString(DateTimeOffset value) { 771protected static string GYearMonthOffsetToString(DateTimeOffset value) { 792protected static string TimeOffsetToString(DateTimeOffset value) { 805internal static DateTime DateTimeOffsetToDateTime(DateTimeOffset value) { 876protected static DateTimeOffset UntypedAtomicToDateTimeOffset(string value) { 877return (DateTimeOffset)(new XsdDateTime(value, XsdDateTimeFlags.AllXsd)); 1420public override DateTime ToDateTime(DateTimeOffset value) { 1444if (sourceType == DateTimeOffsetType) return this.ToDateTime((DateTimeOffset) value); 1455public override DateTimeOffset ToDateTimeOffset(DateTime value) { 1459public override DateTimeOffset ToDateTimeOffset(DateTimeOffset value) { 1460return ((DateTimeOffset) value); 1463public override DateTimeOffset ToDateTimeOffset(string value) { 1478public override DateTimeOffset ToDateTimeOffset(object value) { 1484if (sourceType == DateTimeOffsetType) return ((DateTimeOffset) value); 1486if (sourceType == XmlAtomicValueType) return (DateTimeOffset)((XmlAtomicValue) value).ValueAsDateTime; 1488return (DateTimeOffset)ChangeListType(value, DateTimeOffsetType, null); 1543public override string ToString(DateTimeOffset value) { 1545case XmlTypeCode.Date: return DateOffsetToString((DateTimeOffset) value); 1546case XmlTypeCode.Time: return TimeOffsetToString((DateTimeOffset) value); 1547case XmlTypeCode.GDay: return GDayOffsetToString((DateTimeOffset) value); 1548case XmlTypeCode.GMonth: return GMonthOffsetToString((DateTimeOffset) value); 1549case XmlTypeCode.GMonthDay: return GMonthDayOffsetToString((DateTimeOffset) value); 1550case XmlTypeCode.GYear: return GYearOffsetToString((DateTimeOffset) value); 1551case XmlTypeCode.GYearMonth: return GYearMonthOffsetToString((DateTimeOffset) value); 1553return DateTimeOffsetToString((DateTimeOffset) value); 1567if (sourceType == DateTimeOffsetType) return this.ToString((DateTimeOffset)value); 1592public override object ChangeType(DateTimeOffset value, Type destinationType) { 1596if (destinationType == DateTimeType) return this.ToDateTime((DateTimeOffset) value); 1597if (destinationType == DateTimeOffsetType) return ((DateTimeOffset) value); 1598if (destinationType == StringType) return this.ToString((DateTimeOffset) value); 1599if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(SchemaType, (DateTimeOffset) value)); 1600if (destinationType == XPathItemType) return (new XmlAtomicValue(SchemaType, (DateTimeOffset) value)); 1631if (sourceType == DateTimeOffsetType) return (new XmlAtomicValue(SchemaType, (DateTimeOffset)value)); 1637if (sourceType == DateTimeOffsetType) return (new XmlAtomicValue(SchemaType, (DateTimeOffset)value)); 2223public override DateTimeOffset ToDateTimeOffset(string value) { 2229public override DateTimeOffset ToDateTimeOffset(object value) { 2236return (DateTimeOffset) ChangeTypeWildcardDestination(value, DateTimeOffsetType, null); 2349public override string ToString(DateTimeOffset value) { 2350return DateTimeOffsetToString((DateTimeOffset) value); 2381if (sourceType == DateTimeOffsetType) return DateTimeOffsetToString((DateTimeOffset) value); 2424public override object ChangeType(DateTimeOffset value, Type destinationType) { 2428if (destinationType == StringType) return DateTimeOffsetToString((DateTimeOffset) value); 2781public override DateTimeOffset ToDateTimeOffset(object value) { 2786if (sourceType == XmlAtomicValueType) return (DateTimeOffset)((XmlAtomicValue) value).ValueAs(DateTimeOffsetType); 2788return (DateTimeOffset) ChangeTypeWildcardDestination(value, DateTimeOffsetType, null); 2896public override object ChangeType(DateTimeOffset value, Type destinationType) { 2900if (destinationType == XmlAtomicValueType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.DateTime), (DateTimeOffset) value)); 2997if (sourceType == DateTimeOffsetType) return (new XmlAtomicValue(XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.DateTime), (DateTimeOffset) value)); 3169if (itemTypeDst == DateTimeOffsetType) return ToArray<DateTimeOffset>(value, nsResolver);
System\Xml\Schema\XsdDateTime.cs (4)
196public XsdDateTime(DateTimeOffset dateTimeOffset) : this(dateTimeOffset, XsdDateTimeFlags.DateTime) { 199public XsdDateTime(DateTimeOffset dateTimeOffset, XsdDateTimeFlags kinds) { 433public static implicit operator DateTimeOffset(XsdDateTime xdt) { 452DateTimeOffset result;
System\Xml\XmlConvert.cs (9)
796public static string ToString(DateTimeOffset value) { 801public static string ToString(DateTimeOffset value, string format) { 1291public static DateTimeOffset ToDateTimeOffset(string s) { 1296DateTimeOffset dateTimeOffset = (DateTimeOffset)xsdDateTime; 1300public static DateTimeOffset ToDateTimeOffset(string s, string format) { 1304return DateTimeOffset.ParseExact( s, format, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite ); 1307public static DateTimeOffset ToDateTimeOffset(string s, string[] formats) { 1311return DateTimeOffset.ParseExact( s, formats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite );
System.Xml.Linq (21)
System\Xml\Linq\XLinq.cs (21)
3012else if (value is DateTimeOffset) { 3013s = XmlConvert.ToString((DateTimeOffset)value); 4819/// Cast the value of this <see cref="XElement"/> to a <see cref="DateTimeOffset"/>. 4822/// The <see cref="XElement"/> to cast to <see cref="DateTimeOffset"/>. 4825/// The content of this <see cref="XElement"/> as a <see cref="DateTimeOffset"/>. 4828/// Thrown if the specified element does not contain a valid <see cref="DateTimeOffset"/> value. 4835public static explicit operator DateTimeOffset(XElement element) { 4841/// Cast the value of this <see cref="XElement"/> to an <see cref="DateTimeOffset"/>?. 4844/// The <see cref="XElement"/> to cast to <see cref="DateTimeOffset"/>?. 4847/// The content of this <see cref="XElement"/> as a <see cref="DateTimeOffset"/>?. 4850/// Thrown if the specified element does not contain a valid <see cref="DateTimeOffset"/> value. 4854public static explicit operator DateTimeOffset?(XElement element) { 7030/// Cast the value of this <see cref="XAttribute"/> to a <see cref="DateTimeOffset"/>. 7033/// The <see cref="XAttribute"/> to cast to <see cref="DateTimeOffset"/>. 7036/// The content of this <see cref="XAttribute"/> as a <see cref="DateTimeOffset"/>. 7042public static explicit operator DateTimeOffset(XAttribute attribute) { 7048/// Cast the value of this <see cref="XAttribute"/> to a <see cref="DateTimeOffset"/>?. 7051/// The <see cref="XAttribute"/> to cast to <see cref="DateTimeOffset"/>?. Can be null. 7054/// The content of this <see cref="XAttribute"/> as a <see cref="DateTimeOffset"/>?. 7057public static explicit operator DateTimeOffset?(XAttribute attribute) { 8014public override void WriteValue(DateTimeOffset value) {