Does anyone know how to convert “Date().getTime()” to UTC?
Obviously the getTime() is the users local time so I need a function to get the users timezone, convert the timestamp to UTC so I can then * it by -8 to get the current PST time.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Date.getTimezoneOffset()as seen here. It returns the user’s browser time relative to GMT, which you’ll compare to your server time, relative to GMT.