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 8182357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:50:20+00:00 2026-06-07T00:50:20+00:00

Google calendar throws at me rfc3339, but all my dates are in those milliseconds

  • 0

Google calendar throws at me rfc3339, but all my dates are in those milliseconds since jan 1970.

rfc3999:

2012-07-04T18:10:00.000+09:00

javascript current time: (new Date()).getTime():

1341346502585

I prefer the the milliseconds because I only deal in countdowns and not in dates.

  • 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-06-07T00:50:21+00:00Added an answer on June 7, 2026 at 12:50 am

    Datetimes in that format, with 3 decimal places and a “T”, have well-defined behaviour when passed to Date.parse or the Date constructor:

    console.log(Date.parse('2012-07-04T18:10:00.000+09:00'));
    // 1341393000000 on all conforming engines

    You have to be careful to always provide inputs that conform to the JavaScript specification, though, or you might unknowingly be falling back on implementation-defined parsing, which, being implementation-defined, isn’t reliable across browsers and environments. For those other formats, there are options like manual parsing with regular expressions:

    var googleDate = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.(\d{3})([+-]\d{2}):(\d{2})$/;
    
    function parseGoogleDate(d) {
        var m = googleDate.exec(d);
        var year   = +m[1];
        var month  = +m[2];
        var day    = +m[3];
        var hour   = +m[4];
        var minute = +m[5];
        var second = +m[6];
        var msec   = +m[7];
        var tzHour = +m[8];
        var tzMin  = +m[9];
        var tzOffset = tzHour * 60 + tzMin;
    
        return Date.UTC(year, month - 1, day, hour, minute - tzOffset, second, msec);
    }
    
    console.log(parseGoogleDate('2012-07-04T18:10:00.000+09:00'));

    or full-featured libraries like Moment.js.

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

Sidebar

Related Questions

I'm embedding dates from google calendar into a website, and it's all working, with
I imported Google calendar API on Netbeans with all the needed libraries but it
There's an all-day event on Google calendar, I pulled it, change it to 1-hour
I have seen how to add google calendar, but when I run it, it
I have a google calendar successfully rendering with fullCalendar, but for some reason I'm
I'm trying to load the Google calendar API which comes in PHP, but firstly
i'm querying google calendar api to bring back dates between the start-min and start-max
I have been check out Google Calendar API as fllow: https://developers.google.com/google-apps/calendar/ but i'm not
I am trying to access the google calendar using gdata. but the application closes
I want to use Google Calendar's embed capabilities on a site but I want

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.