# Class WorkflowRuntimeTimeExtensions OptimaJet.Workflow.Core.Runtime.WorkflowRuntimeTimeExtensions Provides extension methods for converting dates and times to runtime time. Namespace: [OptimaJet.Workflow.Core.Runtime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/) ```csharp public static class WorkflowRuntimeTimeExtensions ``` ## Methods `public static DateTime? ToRuntimeTime(this WorkflowRuntime runtime, DateTime? dateTime)` Converts the specified date and time value to runtime time using the runtime's conversion setting. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime used to apply conversion settings. | | `dateTime` | `Nullable` | The value to convert. If [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null), result is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | ### Returns | Type | Description | | --- | --- | | `Nullable` | The converted value or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | `public static DateTime ToRuntimeTime(this WorkflowRuntime runtime, DateTime dateTime)` Converts the specified date and time value to runtime time using [WorkflowRuntimeSettings.UseUtcDateTimeAsRuntimeTime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntimeSettings/). ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The runtime whose settings define the target time mode. | | `dateTime` | `DateTime` | The value to convert. | ### Returns | Type | Description | | --- | --- | | `DateTime` | The converted date and time value. | [Previous WorkflowRuntimeTenantGlobalParameterExtensions](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntimeTenantGlobalParameterExtensions/) [Next WorkflowState](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowState/)