ks888 / LambStatus

[Maintenance mode] Serverless Status Page System
https://lambstatus.github.io
Apache License 2.0
1.3k stars 119 forks source link

Email notification arrives with PST time zone #148

Open allcloud-ronen opened 5 years ago

allcloud-ronen commented 5 years ago

I see that the email notification is hard coded to send the time in PST: https://github.com/ks888/LambStatus/blob/ba950df3241ac9143e03411d6c1a06d126cc0180/packages/lambda/src/api/sendEmails/index.js#L230

Wouldn't it make more sense to make it configurable, or at least hardcode it to UTC which is more universal than PST? Thanks.

ks888 commented 5 years ago

Thank you for your suggestion. Yes, it makes sense to make it configurable, though personally I can't find the enough time to support it.

Also, UTC hardcoding is certainly better than PST. Fortunately we already have the formatDateTime function in utils/datetime and so the changes should be not so difficult. It's great if you have a chance to contribute the code.

pgrzesik commented 5 years ago

Hello, I'd like to take a stab at it - did you have in mind configuration via env variable or something more advanced?

ks888 commented 5 years ago

Sorry for my late reply. If we make it configurable, I think it's better if a user can change the time zone via GUI. In the demo page below, it will be useful if the Notification tab contains the time zone setting item. https://demo-admin.lambstatus.org/settings

Env variable may be possible, but most users can't change it because they launch their stack using CloudFormation.

DannyBen commented 5 years ago

I would also love to see this implemented, and seems like an option in the UI is more along the lines of how LambStatus is used and deployed.

However - regardless of this implementation - I believe the default should be changed from PST, to UTC.