The time obtained by using the getDate () method under Safari is one day slower than that of other browsers.

so far, only cases with zero timestamp have been found
such as
647017200 (00:00:00 on July 4, 1990)
normal in other browsers

safari


timestampToDate: function(timestamp){
                time = new Date(timestamp * 1000)
                var year=time.getFullYear(); 
                var month=time.getMonth() + 1; 
                var date=time.getDate(); 
                return year + "" + month + "" + date + "" ;
            }

I seem to be the only one who has encountered this problem after searching around. Is there something wrong with the converted code?
Thank you in advance

Jun.16,2022

is the problem of daylight saving time. If you output time in Chrome, he prompts you like this:

  

time zone

Menu