nick_sh Posted July 16, 2022 Share Posted July 16, 2022 I'm trying to make some customizations to the events page, but the timestamps Squarespace provides are somehow strange: so e.g. this is startDate: 1657643425538 If I do var date1 = new Date(1657643425538).toString() startDate.toString(date1) // Tue Jul 12 2022 19:30:25 But the correct date set for the event is Friday 23, 2002, 9 AM. So what am I doing wrong? or what would be the best way to transform timestamp into correct date / time? Beyondspace 1 Hire me for SquareSpace development Link to comment
paul2009 Posted July 16, 2022 Share Posted July 16, 2022 Can you provide a few details about your ultimate goal? What are you trying to change about the Events page? Also, it is always helpful if you can provide a public link to the page you are working on so that we can see what you're seeing. About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥. Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links. Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional. Link to comment
Beyondspace Posted May 17, 2023 Share Posted May 17, 2023 I think timezone has been taken into account, so you have to assign correct timezone to the date value BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment