PRX / jingle.prx.org

Phoenix app serving as the backend for TBD ads workflow app
http://jingle.prx.org
GNU Affero General Public License v3.0
0 stars 0 forks source link

Use utc for timestamps #73

Closed gcampo88 closed 6 years ago

gcampo88 commented 6 years ago

I ran into this bug on adflow/spot as well after porting over the TimeAgo Pipe for use there. My fix on adflow/spot was to assume the updated_at was in UTC, and convert it toLocale before setting it as the updatedAt of the campaign model. But since then I've learned that Phoenix saves timestamps as "timestamp without time zone", and it's a little unpredictable what time zone it will actually represent. So I think it might be best to just cast them as UTC all the time. But -- open to other suggestions!