news-catalyst / google-app-scripts

a collection of scripts for tinynews google docs add-ons
https://script.google.com/a/newscatalyst.org/d/1ILURq69o3cYUy6k1n1X6HwxdMfl9xWNhILYuZxgLfeblb3IR15WCMZSj/edit
1 stars 1 forks source link

Allow backdating stories by overriding first published at date #334

Closed jacqui closed 2 years ago

jacqui commented 2 years ago

Closes #330

Selecting a date in the new date picker will override the first published date, which is otherwise automatically set in the database. This is testable using the latest code in the script editor.

TylerFisher commented 2 years ago

Gah, timezones! For me in ET, I set to August 1, and the page shows July 31, 8 p.m. That's probably because we're storing in UTC and my browser is interpreting it as such, then converting to ET. I guess we need to allow people to set times and timezones?

jacqui commented 2 years ago

Doh! My bad, I forgot that JS stores everything in UTC. I've updated the sidebar to be consistent about displaying and storing the time in UTC. It was already storing it that way, but ended up converting it to local time on the way back. I'm getting consistent results now.