DateTimeExtensions

System.DateTimeExtensions

Namespace: System

Assembly: Wisej.Framework (3.1.0.0)

Extends DateTimearrow-up-right with methods to adjust the server-side time to the client's timezone.

public class DateTimeExtensions
circle-info

In Visual Basic and C#, you can call this method as an instance method on any object of type Objectarrow-up-right. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic)arrow-up-right or Extension Methods (C# Programming Guide)arrow-up-right.

Methods

ToClientTime(value)

Converts the DateTimearrow-up-right value to the time zone of the client's browser. When the timezone of the server doesn't match the time zone of the client, you should convert to the client's timezone when using Nowarrow-up-right.

Parameter
Type
Description

value

The DateTimearrow-up-right to adjust to the client's time zone.

Returns: DateTimearrow-up-right.

ToClientTime(value, timezoneOffset)

Converts the DateTimearrow-up-right value to the time zone of the client's browser. When the timezone of the server doesn't match the time zone of the client, you should convert to the client's timezone when using Nowarrow-up-right.

Parameter
Type
Description

value

The DateTimearrow-up-right to adjust to the client's time zone.

timezoneOffset

The time-zone offset in minutes.

Returns: DateTimearrow-up-right.

Last updated

Was this helpful?