google-tasks-api

Using Joda-Time Library to Convert String to DateTime Format in Google Tasks API

风流意气都作罢 提交于 2019-11-30 17:56:54
问题 I have a date/time string which needs to be sent to the Google Tasks API but I can't figure out how to convert a Joda-Time library DateTime object to a Java DateTime object. I'm using Android as the platform. The string starts off as "2012/07/19 22:00:00" and is first converted to Iso format. Here is my code: Task task = new Task(); task.setTitle(title); task.setNotes(note); DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy/MM/dd HH:mm:ss"); DateTime dt = formatter.parseDateTime

Generate an RFC 3339 timestamp similar to Google Tasks API?

旧城冷巷雨未停 提交于 2019-11-27 19:22:14
I am in the process of building an app that syncs with Google Tasks. As part part of the syncing, I want to compare the local task and the API task, and see which one has been changed more recently. Each task from Google's API contains an updated property, which looks like this: 2011-08-30T13:22:53.108Z Now I would like to generate a timestamp similar to that, so that every time I update a task on my app it sets a new updated value. To generate the RFC 3339 timestamp I am using - http://cbas.pandion.im/2009/10/generating-rfc-3339-timestamps-in.html which generates something like this: 2011-08

Generate an RFC 3339 timestamp similar to Google Tasks API?

家住魔仙堡 提交于 2019-11-27 19:09:07
问题 I am in the process of building an app that syncs with Google Tasks. As part part of the syncing, I want to compare the local task and the API task, and see which one has been changed more recently. Each task from Google's API contains an updated property, which looks like this: 2011-08-30T13:22:53.108Z Now I would like to generate a timestamp similar to that, so that every time I update a task on my app it sets a new updated value. To generate the RFC 3339 timestamp I am using - http://cbas