Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6387911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:12:45+00:00 2026-05-25T03:12:45+00:00

I am in the process of building an app that syncs with Google Tasks.

  • 0

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-30T09:30:16.768-04:00

The issue is, the API date is always coming back as “greater” than the local date, even when the local date is newer. I’m guessing it has something to do with the different formatting between the two.

Here are two dates, the top is from the Google Tasks API (from about 10 minutes ago), and the bottom one was generated locally a minute ago. When compared which is greater, it’s telling me the top one is.

2011-08-30T13:22:53.108Z
2011-08-30T09:41:00.735-04:00

Is my formatting wrong? What I am doing wrong here? Any help on this is really appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:12:45+00:00Added an answer on May 25, 2026 at 3:12 am

    The formatting is ISO so new Date().toISOString() will give you that form. Which as I’m reading might need to be shimmed:

    /* use a function for the exact format desired... */
    function ISODateString(d){
     function pad(n){return n<10 ? '0'+n : n}
     return d.getUTCFullYear()+'-'
          + pad(d.getUTCMonth()+1)+'-'
          + pad(d.getUTCDate())+'T'
          + pad(d.getUTCHours())+':'
          + pad(d.getUTCMinutes())+':'
          + pad(d.getUTCSeconds())+'Z'}
    
    var d = new Date();
    print(ISODateString(d)); // prints something like 2009-09-28T19:03:12Z
    

    Source: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am in the process of building a Rails app that will hook into
I am in the process of building a facebook app that works through iFrame
I'm in the progress of building an web-app that syncs with an iOS client.
I'm in the process of building an web app that will, besides other things,
I'm in the process of building an app that currently contains a LOT of
I'm in the process of building a rails app that will basically wrap around
I'm building an App that requires a custom font. I added the form to
I'm in the process of building an app related to healthcare IT. My company
I can't seem to get a facebook connect app that I am building to
We are in the process of writing a native windows app (MFC) that will

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.