Skip to content

BUG, all dates are behind 1 day on UTC+nn timezones (eastern region) #140

@hawajrambo

Description

@hawajrambo

Constructing date in javascript is insane:
To get the wanted date: month should be added -1, and local timezone should be substracted.

we are at UTC+01:00 now.

(new Date(2011,11,31)).toISOString()
"2011-12-30T23:00:00.000Z" 

new Date((new Date(2011,12,31)) - (new Date()).getTimezoneOffset()*1000*60).toISOString()
 "2012-01-31T00:00:00.000Z" 

fb-util should be fixed:

return new Date(decodedDate.year, decodedDate.month - 1, decodedDate.day ) ++++ OFFSET ++++; }

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