vue-datetime icon indicating copy to clipboard operation
vue-datetime copied to clipboard

Populated input shows wrong date

Open gregstephensen opened this issue 5 years ago • 1 comments

When I populate the input with a database value, it shows up as the day before. I give it a valuedate of "2020-05-25T00:00:00.000Z" and then the input value computes as "May 24, 2020." In the database it shows as May 25th so the localization doesn't really make sense.

gregstephensen avatar Jun 01 '20 16:06 gregstephensen

Are you by any chance in a timezone that is in negative UTC (e.g. America)? If so, then that would explain it as the "2020-05-25T00:00:00.000Z" is in UTC, but if you are in some UTC-X timezone, then the date in your browser shows X hours earlier than 2020-05-25 00:00, so 2020-05-24 (24-X):00.

SquarePlayn avatar Jun 04 '20 10:06 SquarePlayn