In my sqlite database I have a table with a field created_at
that stores time in ISO8601 as text
. In the object corresponding to this table I have two fields String date, String time
for the created_at
attribute. Now, while querying for this table and creating a corresponding object I am stuck at converting the ISO8601 string to the current user's timezone's date (YYYY/MM/DD), time (XX:YY pm). Could anyone help me out? I thought of using substring to split the string but then the timezone is UTC for ISO8601 strings.
The ISO8601 string is stored in the database using Instant.now().toString()
tldr: created_at = ISO8601 time string; need to extract date and time portion from it for the current user.