DateTimeExtensions

System.DateTimeExtensions

Namespace: System

Assembly: Wisej.Framework (3.5.0.0)

Extends DateTime with methods to adjust the server-side time to the client's timezone.

public class DateTimeExtensions

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

Methods

Converts the DateTime 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 Now.

ParameterTypeDescription

value

The DateTime to adjust to the client's time zone.

Returns: DateTime.

Converts the DateTime 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 Now.

ParameterTypeDescription

value

The DateTime to adjust to the client's time zone.

timezoneOffset

The time-zone offset in minutes.

Returns: DateTime.

Last updated