Show / Hide Table of Contents

Class Clock

Inheritance
object
Clock
Implements
IClock
ITransientDependency
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.Timing
Assembly: Volo.Abp.Timing.dll
Syntax
public class Clock : IClock, ITransientDependency

Constructors

Clock(IOptions<AbpClockOptions>, ICurrentTimezoneProvider, ITimezoneProvider)

Declaration
public Clock(IOptions<AbpClockOptions> options, ICurrentTimezoneProvider currentTimezoneProvider, ITimezoneProvider timezoneProvider)
Parameters
Type Name Description
IOptions<AbpClockOptions> options
ICurrentTimezoneProvider currentTimezoneProvider
ITimezoneProvider timezoneProvider

Properties

CurrentTimezoneProvider

Declaration
protected ICurrentTimezoneProvider CurrentTimezoneProvider { get; }
Property Value
Type Description
ICurrentTimezoneProvider

Kind

Declaration
public virtual DateTimeKind Kind { get; }
Property Value
Type Description
DateTimeKind

Now

Declaration
public virtual DateTime Now { get; }
Property Value
Type Description
DateTime

Options

Declaration
protected AbpClockOptions Options { get; }
Property Value
Type Description
AbpClockOptions

SupportsMultipleTimezone

Declaration
public virtual bool SupportsMultipleTimezone { get; }
Property Value
Type Description
bool

TimezoneProvider

Declaration
protected ITimezoneProvider TimezoneProvider { get; }
Property Value
Type Description
ITimezoneProvider

Methods

ConvertToUserTime(DateTime)

Declaration
public virtual DateTime ConvertToUserTime(DateTime utcDateTime)
Parameters
Type Name Description
DateTime utcDateTime
Returns
Type Description
DateTime

ConvertToUserTime(DateTimeOffset)

Declaration
public virtual DateTimeOffset ConvertToUserTime(DateTimeOffset dateTimeOffset)
Parameters
Type Name Description
DateTimeOffset dateTimeOffset
Returns
Type Description
DateTimeOffset

ConvertToUtc(DateTime)

Declaration
public DateTime ConvertToUtc(DateTime dateTime)
Parameters
Type Name Description
DateTime dateTime
Returns
Type Description
DateTime

Normalize(DateTime)

Declaration
public virtual DateTime Normalize(DateTime dateTime)
Parameters
Type Name Description
DateTime dateTime
Returns
Type Description
DateTime

Implements

IClock
ITransientDependency

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpObjectExtensions.If<T>(T, bool, Action<T>)
AbpObjectExtensions.If<T>(T, bool, Func<T, T>)
AbpObjectExtensions.IsIn<T>(T, IEnumerable<T>)
AbpObjectExtensions.IsIn<T>(T, params T[])
AbpQueryableExtensions.OrderByIf<T, TQueryable>(TQueryable, bool, string)
AbpQueryableExtensions.PageBy<T, TQueryable>(TQueryable, int, int)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, bool>>)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, int, bool>>)
AbpOpenIddictQueryableExtensions.SkipIf<T, TQueryable>(TQueryable, bool, int?)
AbpOpenIddictQueryableExtensions.TakeIf<T, TQueryable>(TQueryable, bool, int?)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In this article
Back to top Powered by ABP.IO Platform