# Problem with dojo.date.locale.parse and seconds

**URL:** <https://discourse.dojo.io/t/problem-with-dojo-date-locale-parse-and-seconds/488>\
**Category:** Uncategorized\
**Created:** [April 24, 2020, 9:30am UTC](https://discourse.dojo.io/t/problem-with-dojo-date-locale-parse-and-seconds/488 "2020-04-24T09:30:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fiorell](https://avatars.discourse-cdn.com/v4/letter/f/9d8465/32.png) [@Fiorell](https://discourse.dojo.io/u/Fiorell)\
**Post date:** [April 24, 2020, 9:30am UTC](https://discourse.dojo.io/t/problem-with-dojo-date-locale-parse-and-seconds/488/1 "2020-04-24T09:30:34Z")

</div>

Hello,

I want to parse a time string in a given locale. Here is some test code:

```
console.log("Parsing time value [10:30 AM] with locale "+dojo.locale);
result = dojo.date.locale.parse("10:30 AM", { selector : "time" });
console.log("Result: ["+result+"]");

console.log("Parsing time value [10:30:11 AM] with locale "+dojo.locale);
result = dojo.date.locale.parse("10:30:11 AM", { selector : "time" });
console.log("Result: ["+result+"]");

```

And here are the results in the console:

```
Parsing time value [10:30 AM] with locale en-US
Result: [Thu Jan 01 1970 10:30:00 GMT+0100 (Central European Standard Time)
Parsing time value [10:30:11 AM] with locale en-US
Result: [null]

```

It shows that the locale is ‘en-US’ and that it can parse hours + minutes but not the time string with the seconds added. Can someone please help me here? Do I something wrong or is this a bug?

I’m using dojo 1.10.10, Firefox 75.0, Windows 10.

---

<div class="post-metadata">

**Author:** ![Fiorell](https://avatars.discourse-cdn.com/v4/letter/f/9d8465/32.png) [@Fiorell](https://discourse.dojo.io/u/Fiorell)\
**Post date:** [April 27, 2020, 9:18am UTC](https://discourse.dojo.io/t/problem-with-dojo-date-locale-parse-and-seconds/488/2 "2020-04-27T09:18:38Z")

</div>

Small additional question:

Is it OK that

`result = dojo.date.locale.parse("10:30 AM", { selector : "time" });`

returns a string containing the time **and** the date? I would expect that the ‘selector : “time”’ makes sure that only the time is returned?
