Martin Stevnhoved Posted November 11, 2016 Posted November 11, 2016 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 Paul Posted November 11, 2016 Administrators Posted November 11, 2016 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
Martin Stevnhoved Posted November 12, 2016 Author Posted November 12, 2016 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.  Â
Administrators Paul Posted November 13, 2016 Administrators Posted November 13, 2016 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
Martin Stevnhoved Posted November 29, 2018 Author Posted November 29, 2018 ping? on timerzone support in plugins.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now