Jump to content

Recommended Posts

Posted

Hi,

 

When a plugin returns a datetime (eg. in a simpleitem) it is formatted acording to the agent device language and timezone.

Is it somehow possible to format/convert it so it match the mobile apps regional setting and timezone?

 

Br, Martin.

  • Administrators
Posted

Hi Martin,

SimpleItem is like a label, it will render the text exactly as you send it. If you want the datetime to be local you to the mobile app you could use the DateTimePicker instead (even if you just want to show it).

-Paul

Posted

Hi Paul.

Perhaps you could give me a quick example.

I have the same challenge with DateTimeInputItem.

System.DateTime datelocal = System.DateTime.Now;
System.DateTime dateutc = datelocal.ToUniversalTime();

Groups result = new Groups();
Group group = new Group("More Information");
group.Items.Add(new DateTimeInputItem("local", datelocal.ToString()));
group.Items.Add(new DateTimeInputItem("utc", dateutc.ToString()));
result.Add(group);

When running the above on a server in UTC+8 and showing it on a mobile device in UTC+1 it gives me the attached result.

I would like a function that converts the time to the mobile device Time Zone.

Annotation 1 is my phones local time (UTC+1)
Annotation 2 is the servers local time (UTC+8)
Annotation 3 is the servers universal time (UTC)

Br, Martin.

 

 

2016-11-12 13_44_25-2016-11-12 13.38.21.png

  • Administrators
Posted

Hi Martin,

You are correct, sorry for the confusion. We don't support timezone conversion for plugin labels however this would be a great addition so we will definitely consider it for a future release.

-Paul

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...