Skip to content

Millisecond formatter do not work properly #107

@GianlucaVagnoni

Description

@GianlucaVagnoni

If I use a formatter like this "yyyy-MM-dd HH:mm:ss.SSS" the milliseconds section (SSS) is not properly formatted.
Example:

var outputDatestring = "2015-03-25T13:43:00.123+0000";
var date = new Date(outputDatestring);
console.log($.format.date(date, "yyyy-MM-dd HH:mm:ss.SSS"));

This code logs the following result (my browser is in GTM+01:00, so the hour is correct, but not the milliseconds section):
2015-03-25 14:43:00. Eu

Expected result:
2015-03-25 14:43:00.123

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions