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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:00:42+00:00 2026-06-12T12:00:42+00:00

I tried this in the Chrome JS console, with my locale time zone set

  • 0

I tried this in the Chrome JS console, with my locale time zone set as PST:

(new Date("07-15-2005"))

=> Fri Jul 15 2005 00:00:00 GMT-0700 (PDT)

(new Date("07-15-2005")).getTime();

=> 1121410800000

but….

(new Date("2005-07-15"))

=> Thu Jul 14 2005 17:00:00 GMT-0700 (PDT)

(new Date("2005-07-15")).getTime();

=> 1121385600000

I was expecting string parsing to occur in both. But I can’t make out why when format YYYY-MM-DD is used, it assumes a timezone offset. It’s as if I’m expressing “2005-07-15” in my local TZ, but “07-15-2005” is expressed in UTC.

Is the correct explanation?

  • 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-12T12:00:43+00:00Added an answer on June 12, 2026 at 12:00 pm

    The implementation seems to be vendor specific, however looking at the documentation of date parse we see that as of 1.8.5 javascript supports both RFC2822 dates and ISO 8601 dates.

    As per the Date.UTC documentation ISO 8601 dates are assumed to be in UTC time if not otherwise specified and thus the timezone difference is automatically added.

    RFC2822 dates seem to be assumed as local times and as such are not modified.

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

Sidebar

Related Questions

I tried this simple JavaScript code: eval('{Topics:[toto,tata,titi]}') In the Chrome console, for example, this
I was just experimenting and tried putting this in the console: 4 | 2
I just tried this code in Chrome deveoper tools: var str = 1111111; str[0]
If I run this in a JavaScript console in Chrome or Firebug, it works
I'm getting exactly what I want when I do this console.dir(this) in Chrome. Is
My userscript prints some information using console.log() . This works fine in Chrome, but
Tried this: $('.link').click(function(e) { $.getScript('http://www.google.com/uds/api?file=uds.js&amp;v=1.0', function() { $('body').append('<p>GOOGLE API (UDS) is loaded</p>'); }); return
I tried this here: http://jsfiddle.net/92HXT/1/ but it does not work. It only works if
Having tried this query a million different ways, I can't seem to SELECT 'count_lonely_vehicles'
I tried this as a simple test: @functions { private MvcHtmlString helloWorld() { return

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.