felixge/node-dateformat

Formatting Timestamp Converts to local time

gigcasters-dev opened this issue · 2 comments

let date = 2021-08-25T09:30:00-04:00
dateFormat(date, "yyyy-mm-dd'T'HH:MM:ss") // 2021-08-25T08:30:00

My current timezone is CST.
When I format a date in EST to the format "yyyy-mm-dd'T'HH:MM:ss" it adds an hour to make the final date in local time.
I would like the final result to be: 2021-08-25T09:30:00, how do I prevent it from converting the date to local time?

hi
try let date = 2021-08-25T10:30:00

Closing as issue should now be resolved