-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aa storm feature/use local time #1415
Aa storm feature/use local time #1415
Conversation
4c3bc28
to
6557c99
Compare
Build succeeded and deployed at https://prism-1415.surge.sh |
* When additional countries will need to access this module, this function will have to be revisited | ||
*/ | ||
|
||
function formatInLocalTime(date: Date, fmt: string): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could pass a timezone parameter with default value like this to be more generic even if we just need the mozambic time for now :
export function formatInLocalTime(date: Date, fmt: string, timeZone: string = 'Africa/Blantyre'): string {
const dateInLocalTime = utcToZonedTime(date, timeZone);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works well, thanks!
Description
How to test the feature:
Checklist - did you ...
Test your changes with
REACT_APP_COUNTRY=rbd yarn start
REACT_APP_COUNTRY=cambodia yarn start
REACT_APP_COUNTRY=mozambique yarn start
Screenshot/video of feature: