---
id: "T:cAlgo.API.UserTimeOffsetChangedEventArgs"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Application/UserTimeOffsetChangedEventArgs/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# UserTimeOffsetChangedEventArgs (class)

Represents the user time offset change event data.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public class UserTimeOffsetChangedEventArgs
```

## Examples

C#:

```csharp
using cAlgo.API;

namespace cAlgo
{
    // This example shows how to use the UserTimeOffsetChangedEventArgs
    // Change your cTrader platform time offset/zone to see the print message
    public partial class UserTimeOffsetChangedEventArgsSample : Indicator
    {
        protected override void Initialize()
        {
            Application.UserTimeOffsetChanged += OnApplicationUserTimeOffsetChanged;
        }

        private void OnApplicationUserTimeOffsetChanged(UserTimeOffsetChangedEventArgs obj)
        {
            Print("User time offset changed to: {0}", obj.UserTimeOffset);
        }

        public override void Calculate(int index)
        {
        }
    }
}
```

Python:

```python
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def initialize(self):
        api.Application.UserTimeOffsetChanged += self.on_application_user_time_offset_changed

    def on_application_user_time_offset_changed(self, args):
        print(f"User time offset changed to: {args.UserTimeOffset}")
```

config.json:

```json
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}
```

## Properties

- `public TimeSpan UserTimeOffset {get;}` — Gets the user time offset. [details](https://help.ctrader.com/ctrader-algo/references/Application/UserTimeOffsetChangedEventArgs/UserTimeOffset/index.md)

