android api for setting the system date format

72 views
Skip to first unread message

Johannes Kehrer

unread,
Oct 2, 2017, 11:37:35 AM10/2/17
to android-platform

I want to change the system date format to the ISO8601 format. On all android versions I have seen, this is not possible in the system settings, at least if you have "German" locales. On some systems it is not possible at all to deviate from the default format.

Actually e.g. on an S8 the it is not possible at all to change it without changing the language. Which is a really pain...., because e.g. in Germany the official format is ISO8601, but Android does not support it, only the half-officail DD.MM.YYYY format.


Is there a api call to change the system date format?


I have seen there are api calls to GET the system date format, but I couldn't find one to set the system date format?


Thanks

#oofergang

unread,
May 29, 2018, 12:46:10 PM5/29/18
to android-platform
You could convert the returned value into a string, and write code to interpret the string and convert it to the desired format. That should work regardless of there being an available API for it as long as you are able to retrieve the date and time in some way.
Reply all
Reply to author
Forward
0 new messages